Debugging CUDA MEX in VS2017 (v2)
Mostra commenti meno recenti
Hello,
I'm going to mirror a question asked two years because I've run into a similar issue :
I've also asked this question at NVIDIA developper forum and will include the link for cross reference:
I've run into "CUDA_ERROR_ILLEGAL_ADDRESS", and using the host side debugger identified that it occurs when I try to fetch data back from the GPU while invoking "mxGPUCreateMxArrayOnCPU()". I would like to enter debugging mode inside the kernel to follow what is happening device side but I can't use the legacy debugger via VS2017 because it does not support my graphics card, and the next-gen debugger does not support remote debugging.
Does anyone know a workaround about this without having to resort to print statements?
Thanks in advance
1 Commento
Joss Knight
il 24 Mar 2021
Modificato: Joss Knight
il 24 Mar 2021
First, synchronize using cudaDeviceSynchronize(), then call cudaGetLastError() and make sure the error hasn't actually already occurred before you call mxGPUCreateMxArrayOnCPU. Hamza's suggestion of cuda-memcheck is a good idea. If everything is fine then you might want to post your kernel code here for us to debug by inspection.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su GPU Computing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!