Tag Archives: TensorRT.

[Solved] TensorRT Error: Assertion Error in trtSmToCask: 0 (Unsupported SM.)

Error message:

E20211126 11:55:13.654 140412916315904 tensorrt.cpp:10] …/rtSafe/cuda/caskUtils.cpp (98) – Assertion Error in trtSmToCask: 0 (Unsupported SM.)

Reason: tensorrt version does not match CUDA or cudnn version. For example, the author’s tensorrt version is 7.2.1, while CUDA is the latest 11.5 version. CUDA version is too high to adapt:

Solution: reinstall CUDA or tensorrt
suggestion: reinstall CUDA because different versions of tensorrt have inconsistent codes. For example, tensorrt 7.2.1 and tensorrt 8.2.1 require that noexcept be added when rewriting virtual functions. If the amount of code is small, consider reinstalling tensorrt
attach the matching requirements of tensorrt, CUDA and cudnn versions: tensorrt release note

Use of C + + ifstream and error handling

Recently, we are doing the analysis of the text file of prototext: the main reference code is: https://github.com/HoboChen/hoboprototxt

In the process of drawing a cat according to a tiger, some mistakes occurred. The record is as follows:

Errors in use:

1.error: no matching function for call to ‘std::basic_ ifstream<char>::open(const string&)’t.open(fileN)

Solution: Reference: https://stackoverflow.com/questions/43105655/no-matching-call-function-error-for-fstream

This mainly means that when the open function is used, the parameter type specified by the function is const char *, but a string type parameter is passed in the process of using it. At this time, the string type parameter needs to be converted to the parameter type required by open. A method proposed in the reference is to use C_ str();