Buffer corruption when i use opencv CUDA

Hello

i use xavier NX.
i’m trying to make a rotation plugin using opencv
it is not difficult
but when i change the computing object(CPU to GPU)

In simple terms, I used the CUDA version opencv
PROBLEM
it make flickering and buffer shift

it does not appear always but when CPU usage over 50~60
it occurs
i already use jetson_clocks and change VIC frequency to maximum
it looks like buffer corruption but i’m not sure
how can i solve this problem?

Thanks for helping me

Hi,

Have you added a synchronization call to ensure all the GPU tasks finished before accessing the buffer?
If not, the buffer may not be ready, and the behavior will vary due to the processor workload.

Thanks.