This happens only if the program is being profiled under nvprof. I do call cudaDeviceSynchronize() before calling cudaProfilerStop(). The hang happens either if I explicitly call cudaProfilerStop() or cudaDeviceReset(). I free any previous memory allocation before attempting a cudaProfilerStop(). Here is what the profile output looks like http://i.imgur.com/mD1nPBG.png : you can see I upload some memory, run kernels, download the result to host, then there’s the huge blank space which is the host thread blocked. The last “Runtime API” command is cudaDeviceReset(), but the fact that it appears after the huge blank is bogus, I could confirm that the host thread is already in cudaDeviceReset() the whole time.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Strange cudaLaunch stall in NV Visual Profiler | 1 | 837 | November 29, 2012 | |
nvprof becomes unresponsive | 6 | 940 | June 27, 2018 | |
NVVP appears to hang | 1 | 526 | February 11, 2017 | |
Strange cudaLaunch stall in NV Visual Profiler | 1 | 2070 | November 29, 2012 | |
nvprof makes an application hang at exit after main | 14 | 1276 | April 15, 2019 | |
computeprof hangs x11 | 1 | 8595 | December 14, 2011 | |
prepare functions to profile with nvprof | 2 | 543 | May 28, 2019 | |
CudaFree Hanging? | 3 | 2139 | July 24, 2016 | |
NVidia Visual Profiler v7.5 hangs indefinitely. | 1 | 1081 | November 20, 2015 | |
Focused profiling with nvprof not working? | 1 | 1177 | May 28, 2020 |