There isn’t any automatic method to trigger a warning when an INF value is loaded or stored in GPU code, or is the result of a calculation. You can “manually instrument” the code with the isinf()
type functions provided by the CUDA Math libraries.
Here is an example discussion showing its use. There are different versions for float
vs. double
. With a bit of searching you can find other forum discussions like that one.