I am using tensorrt container (tensorrt:19.11-py3) and trying to use CuPy library (https://cupy.chainer.org/) in the script onnx_resnet50.py under /opt/tensorrt/samples/python/introductory_parser_samples/. In the script file, I call do_inference() function then do some calculations with CuPy without any problem. However, when I call do_inference() again, the following exception occurs:
[TensorRT] ERROR: ../rtSafe/cuda/cudaElementWiseRunner.cpp (149) - Cuda Error in execute: 400 (invalid resource handle) [TensorRT] ERROR: FAILED_EXECUTION: std::exception
Is there any solution for this problem ?