| 92 | { |
| 93 | |
| 94 | inline 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 | |
| 103 | inline int32_t getMHAMaskPackedSize(int32_t smVersion, nvinfer1::DataType dataType, int32_t sequenceLength) |
| 104 | { |
no test coverage detected