Files
tracy/examples/CUDAGraphRepro/README.md
Basil Milanich 6c6999bf01 Add CUDA Graph GPU zone repro
Minimal reproducer showing that CUDA Graph-launched kernels produce
0 GPU zones in Tracy. The repro creates a simple graph (2 kernels +
1 memcpy), launches it 10 times, and expects ~30 GPU zones. Without
the fallback patch, all activity records are dropped by matchError().

Tested on NVIDIA H100, CUDA 13.1.
2026-03-24 09:37:50 -05:00

862 B

Tracy CUDA Graph GPU Zone Repro

Demonstrates that unpatched Tracy fails to show GPU zones for kernels launched via CUDA Graphs (cudaGraphLaunch).

Root cause

When kernels are launched through CUDA Graphs, CUPTI delivers CONCURRENT_KERNEL and MEMCPY activity records but no corresponding API callback fires for the individual kernel launches. Tracy's matchActivityToAPICall() always fails, and matchError() silently drops every GPU zone.

Build and run

make
./repro

What to expect

Tracy version GPU zones shown
Unpatched 0
Patched (cuda-graph-gpu-zones.patch) ~30 (10 launches x 3 ops)

The graph structure

Each graph launch contains:

  1. vector_add kernel (c = a + b)
  2. Device-to-device memcpy
  3. vector_add kernel (c = a + c)

The graph is launched 10 times, so 30 GPU operations total.