I can use nvcc --ptxas-options=-v to discover how many registers my kernels
will use when I compile them, but is the same information available at
I would like to prevent my code trying to launch a kernel if the product
of maxrregcount and ThreadsPerBlock would take the kernel above the number
of registers available (in deviceProp.regsPerBlock). At present, if this
limited is exceeded my program is aborted with a segfault.
Thanks in advance
(See previous topic NVS 290 texture problem https://devtalk.nvidia.com/default/topic/547192/cuda-programming-and-performance/quadro-nvs-290-cudaerrorinvalidtexture-arch-sm_11/)