In some test code I wrote, I noticed that cudaThreadExit totally reinitializes the CUDA runtime. Unfortunately I found that out after reading the documentation more closely–of course, after wasting a bit of time chasing down a “bug” 8(. After calling cudaThreadExit, all previously allocated memory is freed. Now the reason I called cudaThreadExit anyways was to clear a trashed thread that dereferenced a host pointer (got stuck in the “Unknown error” state), and recover. But, I could see it happening also for deadlocked threads, or threads taking just too long. Is there any way to kill a kernel without totally trashing the rest of the CUDA runtime?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
cudaThreadExit() cleanup Does it work? | 6 | 29709 | May 27, 2009 | |
Is cudaThreadExit necessary? | 1 | 857 | June 9, 2009 | |
does cudaThreadExit() clean up the memory allocated by cudaMalloc() | 5 | 8042 | November 9, 2010 | |
cudaThreadExit not implicitly called.... Ramifications? | 3 | 2564 | February 2, 2011 | |
cudaThreadExit not working Bug Report | 3 | 8428 | June 24, 2010 | |
Free all allocated memory on the device? Is there a way to free all the memory I allocated during a | 8 | 14081 | November 8, 2016 | |
Is it possible to terminate a cuda stream while it is running? | 9 | 2907 | May 31, 2019 | |
cudaThreadExit( void ) Vs cudaThreadSynchronize() Differnce between the two | 2 | 6443 | April 25, 2010 | |
When to use cudaThreadExit() | 11 | 7257 | March 1, 2010 | |
seg fault when calling cudaThreadExit multiGPU issue | 2 | 4880 | June 3, 2008 |