Closed Egorundel closed 3 months ago
Ple check calib code, like batch size, h2d mem, use cuda side ptr, calib profile, etc.
@Egorundel have you tried call setCalibrationProfile
before calibration since your model has dynamic shape?
I reworked my code (C++) and now it works correctly. I used nvinfer1::IInt8EntropyCalibrator2
.
https://github.com/Egorundel/int8_calibrator_cpp
You can take it and use it, and also integrate my solution into any of yours in C++.
Description
Hello!
I have written code here for INT8 calibration of the ONNX model and further creation of the TensorRT Engine.
my repo: https://github.com/Egorundel/int8_calibrator_cpp
However, when I start calibration, I get errors:
Screenshot of errors:
Please help me solve this problem. What am I doing wrong in the code?
Let's make a practically universal TensorRT Engine calibration and creation tool and help other people together!
Environment
TensorRT Version: 8.6.1.6 NVIDIA GPU: RTX 3060 NVIDIA Driver Version: 555.42.02 CUDA Version: 11.1 CUDNN Version: 8.0.6
Operating System:
Python Version (if applicable): 3.8 PyTorch Version (if applicable): 1.10.1
Steps To Reproduce
CMake, build and launch my code in C++ IDE.