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

Function getSMVersion

plugin/common/bertCommon.h:94–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92{
93
94inline int32_t getSMVersion()
95{
96 int32_t device{-1};
97 PLUGIN_CHECK(cudaGetDevice(&device));
98 cudaDeviceProp props;
99 PLUGIN_CHECK(cudaGetDeviceProperties(&props, device));
100 return nvinfer1::plugin::getTrtSMVersionDec(props.major, props.minor);
101}
102
103inline int32_t getMHAMaskPackedSize(int32_t smVersion, nvinfer1::DataType dataType, int32_t sequenceLength)
104{

Calls 1

getTrtSMVersionDecFunction · 0.85

Tested by

no test coverage detected