Yes, I’m also using GPU with PC version. (same code on both platforms)
If I remove cudaStreamAttachMemAsync, it doesn’t generate trash pixel on TX2. I have no idea what I should check for, is there any specific article or document to help me understand this problem?
This issue looks weird to me. Could you help to check the return status of both cudaStreamAttachMemAsync?
I will check if there is any limitation on the Jetson platform.
I’ve tried again, cudaStreamAttachMemAsync returned cudaSuccess on both platforms. The trash pixels appear if I set cudaStreamAttachMemAsync(stream, b, 0, cudaMemAttachHost); to get my output only, it doesn’t happen with cudaStreamAttachMemAsync(stream, a, 0, cudaMemAttachGlobal);.
I suspect that UM pointer was attached to host while some threads were active, then those threads couldn’t write results to memory due to lock-state (limit to host-access only after mem pointer is attached). I’m going to research your given document, if you have another suggestion, please drop me.
Here is my sample code [url]http://s000.tinyupload.com/?file_id=00535759807175788814[/url]. This source is using opencv3.4.4 for image load/save utility. To build executable file, please cd to simple_remap/Debug => run make => launch app by “./simple_remap” then check result in simple_remap/Debug/images.
When reproducing this issue, we keep meeting several library link issues.
It looks like your makefile is generated from cmake. (please correct me if I’m wrong)
Would you mind to share the CMakeList.txt with us so we can general a makefile based on our environment?
We find there are several x86_64-linux-gnu link inside the makefile.
Suppose the sample is applied on the TX2, is it any reason to link the x86 library?
Or could you update a version for the aarch64 link for us?
Thanks.
Sorry about this mistake. My sample code was extracted from private project which included some irrelevant configurations for compiling on TX2. I’ve just cleaned it, and tried to compile on both platforms. Please check again!.
I also attached more images for testing, the trash pixels issue only occurs after second image is processed.