Closed aravindchakravarti closed 4 months ago
Just for checking cuda api return error. Here https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__ERROR.html
Hi @triple-Mu Sorry for delayed reply. I was off from work. Thank you for your reply.
So, basically, if I comment out CHECK
, meaning if I run the code like below, I will not catch the error which might occur during cudaMemcpyAsync
. Is my understanding right?
cudaMemcpyAsync(
this->device_ptrs[0], nchw.ptr<float>(), nchw.total() * nchw.elemSize(), cudaMemcpyHostToDevice, this->stream);
The reason I am asking is,
We are integrating your code in Gstreamer/Deepstream platform. If we run single instance of your code, we are not getting any error in cudaMemcpyAsync
line, however, if we run 2 (two) instances of your code parallelly, we get error at cudaMemcpyAsync
line.
Do you think it is something related to synchronization? or race-condition?
Hi @triple-Mu Sorry for delayed reply. I was off from work. Thank you for your reply.
So, basically, if I comment out
CHECK
, meaning if I run the code like below, I will not catch the error which might occur duringcudaMemcpyAsync
. Is my understanding right?cudaMemcpyAsync( this->device_ptrs[0], nchw.ptr<float>(), nchw.total() * nchw.elemSize(), cudaMemcpyHostToDevice, this->stream);
The reason I am asking is, We are integrating your code in Gstreamer/Deepstream platform. If we run single instance of your code, we are not getting any error in
cudaMemcpyAsync
line, however, if we run 2 (two) instances of your code parallelly, we get error atcudaMemcpyAsync
line. Do you think it is something related to synchronization? or race-condition?
Do you mean two process? I think it doesn't matter if you open two process.
Thanks @triple-Mu
Hi, When I look at the tensorRT inference code (
csrc/detect/normal/include/yolov8.hpp
), in many placesCHECK
has been called to look for some errors. For example, see belowI am not understanding the use of
CHECK
. What it is doing and is it mandatory to haveCHECK
?CHECK
expands as below.