KhronosGroup / KhronosGroup/OpenCL-Guide

Whether modern GPUs support full source-level debugging of OpenCL kernels, what tools provide it, and how GPU debuggers handle GPU-specific execution concepts such as wavefronts, warps, and work-items.

Open
#44 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
711
Forks
70
PR merge metrics
No merged PRs in 30d

Description

I am trying to understand the current state of source-level debugging for OpenCL kernels running on GPUs.

For CPU OpenCL implementations, source-level debugging is generally possible using standard debuggers. However, I am specifically interested in debugging OpenCL kernels executing on actual GPU hardware.

My questions are:

1. Is there currently a full-fledged debugger that supports source-level debugging of OpenCL kernels on GPUs?

2. Can such a debugger:

* Set breakpoints inside kernels?
* Single-step kernel instructions?
* Inspect kernel variables (private, local, and global memory)?
* Inspect work-item and work-group state?
* Switch between individual work-items and inspect each work-item's execution state independently?
* View call stacks and source line mappings?

3. Are there vendor-specific solutions (AMD, Intel, NVIDIA) that provide this functionality?

4. How is this typically implemented under the hood, given that GPU execution is based on wavefronts/warps rather than independently scheduled threads?

5. If true source-level debugging is not generally available, what are the main technical limitations that make it difficult?

I would also appreciate references to any open-source or commercial tools that support OpenCL kernel debugging, as well as any papers, documentation, or presentations describing the current state of GPU debugging.

My goal is to understand whether OpenCL kernel debugging on GPUs has reached a level comparable to CPU debugging with GDB/LLDB, or whether developers still primarily rely on printf-style debugging, simulators, and profiling tools.

For context, I am particularly interested in AMD ROCm, Intel GPU runtimes, PoCL, and other modern OpenCL implementations.

Contributor guide

Open the contributing guide

Research direction

No file or test is identified. Start by surveying GPU debugging support for AMD ROCm, Intel GPU runtimes, PoCL, and other OpenCL implementations, including vendor tools, source-level features, and the wavefront or warp execution model. Done means documenting the current capabilities, limitations, and relevant open-source, commercial, or academic references.

Written by the indexing model from the issue text.

Assessment

Domain
devtools, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.