A sticky CUDA error (e.g. an illegal memory access in a kernel) leaves the primary context active but unusable, so CUFDeviceIsActive() reports it as fine and the compiler-generated scope-exit frees abort a program that ran to completion: 'cudaFree(p)' failed with 'cudaErrorIllegalAddress'. Detect this by freeing a null pointer, a no-op that still reports the sticky error. It runs only once the primary context is known active, so it cannot lazily create one. |
||
|---|---|---|
| .. | ||
| allocatable.cpp | ||
| allocator.cpp | ||
| CMakeLists.txt | ||
| descriptor.cpp | ||
| init.cpp | ||
| kernel.cpp | ||
| memmove-function.cpp | ||
| memory.cpp | ||
| pointer.cpp | ||
| registration.cpp | ||
| stream.cpp | ||