[TensorRT] ERROR: ../rtSafe/cuda/reformat.cu (925) - Cuda Error in NCHWToNCHHW2: 400 (invalid resource handle)
[TensorRT] ERROR: FAILED_EXECUTION: std::exception
参考Python多线程中使用TensorRT_卑微小岳在线debug的博客-CSDN博客_tensorrt多线程
TensorRT python多进程推理踩坑_Mist-S的博客-CSDN博客_多线程推理
解决方法,修改以下部分代码
cuda_ctx = cuda.Device(0).make_context()
self.cuda_ctx = cuda_ctx
if self.cuda_ctx:
self.cuda_ctx.push()
if self.cuda_ctx:
self.cuda_ctx.pop()