enazoe / yolo-tensorrt

TensorRT8.Support Yolov5n,s,m,l,x .darknet -> tensorrt. Yolov4 Yolov3 use raw darknet *.weights and *.cfg fils. If the wrapper is useful to you,please Star it.
MIT License
1.19k stars 315 forks source link

多线程会报Cuda Error in execute: 77 (an illegal memory access was encountered)错误 #37

Closed kunyao2015 closed 4 years ago

kunyao2015 commented 4 years ago

单线程调用正常,多线程调用时跑一会就会报类似Cuda Error in execute: 77 (an illegal memory access was encountered)的错误,错误处大约在yolo.cpp 中的Yolo::doInference NV_CUDA_CHECK(cudaMemcpyAsync(m_DeviceBuffers.at(m_InputBindingIndex), input, batchSize * m_InputSize * sizeof(float), cudaMemcpyHostToDevice, m_CudaStream)); 有遇到相关的问题吗?

enazoe commented 4 years ago

inference不支持多线程,你两个线程实例化两个模型试下