# Code coverage tool for CUDA device code

**URL:** <https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374>\
**Category:** CUDA Programming and Performance\
**Created:** [April 30, 2024, 9:37am UTC](https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374 "2024-04-30T09:37:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.kamalasubha](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@m.kamalasubha](https://forums.developer.nvidia.com/u/m.kamalasubha)\
**Post date:** [April 30, 2024, 9:37am UTC](https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374/1 "2024-04-30T09:37:34Z")

</div>

Hi,  
Is there any code coverage tool/method available to analyze CUDA kernel code with the latest version?  
I found the following info in the given [link](https://docs.nvidia.com/cuda/cuda-features-archive/index.html#),  
_NVCC compiled source code now works with the code coverage tool Bullseye. The code coverage is only for the CPU or the host functions. Code coverage for device function is not supported through bullseye._

To check code coverage for device functions and kernel functions, anything tool is available with nvcc?

---

<div class="post-metadata">

**Author:** ![Robert\_Crovella](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/robert_crovella/32/14043_2.png) [@Robert\_Crovella](https://forums.developer.nvidia.com/u/Robert_Crovella)\
**Post date:** [April 30, 2024, 2:59pm UTC](https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374/2 "2024-04-30T14:59:51Z")

</div>

a google search turned [this](https://www.vector.com/es/es/eventos/global-de-en/webinar-recordings/2021/coffee-with-vector-code-coverage-for-cuda-code-using-vectorcastqa/) up. I know nothing about it.

---

<div class="post-metadata">

**Author:** ![Curefab](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Curefab](https://forums.developer.nvidia.com/u/Curefab)\
**Post date:** [April 30, 2024, 3:52pm UTC](https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374/3 "2024-04-30T15:52:33Z")

</div>

As a semiautomatic tool: Nsight Compute records and shows for each source code line (and separately for PTX/SASS) the number of instructions executed.

---

<div class="post-metadata">

**Author:** ![emailkirangowda](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@emailkirangowda](https://forums.developer.nvidia.com/u/emailkirangowda)\
**Post date:** [September 12, 2024, 7:53am UTC](https://forums.developer.nvidia.com/t/code-coverage-tool-for-cuda-device-code/291374/4 "2024-09-12T07:53:57Z")

</div>

Check out [this](https://www.rkvalidate.com/code-coverage-cuda-nvidia-host-device/) tool,. It generates code coverage for both host and GPU code with easy steps and supports both Windows and Linux.
