I use NVIDIA Nsight Compute on Linux. Version 2020.1.2
When profiling either interactively, or via CLI, I get:
==PROF== Profiling "osino_computefield" - 1: 0%....50%.. - 11 passes ==ERROR== Failed to profile kernel "osino_computefield" in process 63168 ==ERROR== The application returned an error code (8). ==ERROR== An error occurred while trying to profile. ==WARNING== No kernels were profiled. ==WARNING== Profiling kernels launched by child processes requires the --target-processes all option.
I run as root.
The kernel was launched by a OpenGL application.
When I tried to profile a smaller binary, with no graphics, just a test launch of the kernel, it did work.
So I am guessing that the Nsight Compute tool gets confused if OpenGL and CUDA get mixed in a single application.
Note that the error code (8) is not coming from my application. I think the Nsight command line util produces that.