The CUDA programming language and CUDA architecture do not currently support infinite kernels. I suggest you consider Roger's suggestion.
If you want to continue this, I suggest you add the following debugging code to your kernel:
- The increment of the variable in the committed memory every N hours (may require a different location for each SM) and
- Periodically read the memory location that the CPU can update to report kernel output.
This is a software watchdog.
You can use clock () or clock64 () to control how often you do (1) and (2).
You can use cuda-gdb to debug your problem.
Endless loops are not supported on the language. The compiler may be stripping code. You can view PTX and SASS. If the compiler generates bad code, you can fake it if the compiler thinks that there is a valid exit condition.
source share