# The profiler returned an error code:1

**URL:** <https://forums.developer.nvidia.com/t/the-profiler-returned-an-error-code-1/204863>\
**Category:** Nsight Compute\
**Created:** [March 2, 2022, 9:28am UTC](https://forums.developer.nvidia.com/t/the-profiler-returned-an-error-code-1/204863 "2022-03-02T09:28:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user167197](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@user167197](https://forums.developer.nvidia.com/u/user167197)\
**Post date:** [March 2, 2022, 9:28am UTC](https://forums.developer.nvidia.com/t/the-profiler-returned-an-error-code-1/204863/1 "2022-03-02T09:28:06Z")

</div>

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

 ![Image_20220302144158](https://global.discourse-cdn.com/nvidia/original/3X/b/3/b32d4a966c65e06c717b40152b077d3451df79e9.png)

---

<div class="post-metadata">

**Author:** ![felix\_dt](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/felix_dt/32/14043_2.png) [@felix\_dt](https://forums.developer.nvidia.com/u/felix_dt)\
**Post date:** [March 2, 2022, 4:03pm UTC](https://forums.developer.nvidia.com/t/the-profiler-returned-an-error-code-1/204863/2 "2022-03-02T16:03:07Z")

</div>

> 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](https://docs.nvidia.com/cuda/cuda-gdb/index.html), [compute-sanitizer](https://docs.nvidia.com/cuda/compute-sanitizer/index.html) or [Nsight Visual Studio Edition](https://docs.nvidia.com/cuda/nsight-visual-studio-edition/index.html).

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](https://developer.nvidia.com/nsight-compute) 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.
