The profiler returned an error code:1

I recently learned to debug my kernel with nsight compute, but this error occurs every time, which makes me very depressed. I checked my GPU and CUDA versions, and there is no problem. I hope a professional can answer it. Thank you very much!
GPU: RTX3060
CUDA Version: 11.5
Nsight compute version:2021.3.0

I recently learned to debug my kernel with nsight compute

Please note that Nsight Compute is not a kernel debugger, but a kernel profiler. It should not be used with kernels that have correctness or stability issues, but only for performance optimization. For a kernel debugger, please use cuda-gdb, compute-sanitizer or Nsight Visual Studio Edition.

Assuming that your kernel is correct and you really just want to profile it, there isn’t enough info to root-cause what might be going wrong. My first suggestion would be for you to try the latest Nsight Compute version. Note that newer tool versions are backwards-compatible, even with older CUDA runtimes and drivers.

If that does not fix the issue, you might want to try with only a single-pass metric like

--metrics gpc__cycles_elapsed.max

or share more info about what your kernel is doing, how it is launched, etc.