-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to cast Python instance to C++ type of TensorRT 8.4 when running INT8 calibration on GPU A100 #3871
Comments
@rmccorm4 Hi, I write the get_batch() function followed by your instruction in issue: https://github.com/NVIDIA/TensorRT/issues/688, but it still get the Error: RuntimeError: Unable to cast Python instance to C++ type (compile in debug mode for details), could you please help me to checkout what's wrong? Thank you very much! |
+1 |
When I try to conduct INT8 quantilization in Python, it always give the following error during the calibration procedure:
[05/16/2024-18:22:28] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 2904, GPU 74855 (MiB)
[05/16/2024-18:22:28] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 2904, GPU 74863 (MiB)
[05/16/2024-18:22:28] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +10, now: CPU 2904, GPU 74839 (MiB)
[05/16/2024-18:22:28] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 2904, GPU 74847 (MiB)
[05/16/2024-18:22:28] [TRT] [I] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +16, now: CPU 130, GPU 272 (MiB)
[05/16/2024-18:22:28] [TRT] [I] Starting Calibration.
[ERROR] Exception caught in get_batch(): Unable to cast Python instance to C++ type (compile in debug mode for details)
[05/16/2024-18:22:30] [TRT] [I] Post Processing Calibration data in 2.704e-06 seconds.
[05/16/2024-18:22:30] [TRT] [E] 1: Unexpected exception _Map_base::at
Failed to create the engine
How can I fix it? The get_batch() function in Calibration instance are programmed like this:
The text was updated successfully, but these errors were encountered: