MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / getElementSize

Function getElementSize

plugin/common/bertCommon.h:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132inline uint32_t getElementSize(nvinfer1::DataType t) noexcept
133{
134 switch (t)
135 {
136 case nvinfer1::DataType::kINT32: return 4;
137 case nvinfer1::DataType::kFLOAT: return 4;
138 case nvinfer1::DataType::kHALF: return 2;
139 case nvinfer1::DataType::kBOOL:
140 case nvinfer1::DataType::kUINT8:
141 case nvinfer1::DataType::kINT8:
142 case nvinfer1::DataType::kFP8: return 1;
143 }
144 return 0;
145}
146
147inline int64_t getWeightsSize(nvinfer1::Weights const& w, nvinfer1::DataType type)
148{

Callers 15

getWeightsSizeFunction · 0.70
getSerializationSizeMethod · 0.50
serializeMethod · 0.50
getSerializationSizeMethod · 0.50
serializeMethod · 0.50
getSerializationSizeMethod · 0.50
serializeMethod · 0.50
configurePluginMethod · 0.50
configurePluginMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected