Commit Graph

12 Commits

Author SHA1 Message Date
Bartosz Taudul
cae9bf0bef Decrease rate of event production in test application. 2026-08-22 14:31:58 +02:00
Robin Oger
5df9ac73c7 Defer CUDA GpuNewContext for on-demand connections.
CUDACtx's constructor writes GpuNewContext directly through
QueueSerialFinish(), unlike every other GPU backend (Vulkan, OpenGL,
D3D11/12, Metal, WebGPU, Rocprof), which all defer it via
GetProfiler().DeferItem() so it survives on-demand's per-connection
queue clear.

A profiler connecting any time after the CUDA context is created (in
practice: any time after process start) never receives GpuNewContext.
The GpuContextName message that Name() sends right after (already
correctly deferred) then crashes the server's
Worker::ProcessGpuContextName with an unregistered context id
(assert(ctx) fails; undefined behavior in release builds).

Same fix already applied to the Rocprof backend in #1336. Fixes #1171.

Includes a repro test under tests/cuda/repro/on_demand/, mirroring the
structure #1336 added for Rocprof: a minimal CUDA program that creates
an on-demand context (repro.cu/CMakeLists.txt), and a check_gpu_zones
tool that loads the resulting .tracy file and verifies the GPU context
was named and populated with zones. Verified locally: unpatched
tracy-capture crashes on the first connection attempt; patched, three
consecutive connect/disconnect cycles all succeed and check_gpu_zones
reports a named context with recorded zones.
2026-08-03 10:48:20 +02:00
Basil Milanich
030e699eb5 Move rocprof on-demand repro to tests/ and convert to CMake
Conform to the new repo layout (master moved repros under tests/, e.g.
tests/cuda/repro/graph). Relocate examples/RocprofOnDemandRepro to
tests/rocprof/repro/on_demand and replace the hand-written Makefile with
a CMake build mirroring the CUDA repro: builds the HIP reproducer, wires
it as a ctest target, and optionally builds the check_gpu_ctx_name
verification helper against the Tracy server library.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:47:22 -05:00
Marcos Slomp
19549693a0 removing Makefile 2026-06-05 12:46:10 -07:00
Marcos Slomp
10d64d69b5 better ctest integration across the board 2026-06-05 12:46:10 -07:00
Marcos Slomp
d89c956394 CUPTI DLL paths... 2026-06-05 12:46:10 -07:00
Marcos Slomp
79467b4b31 cmake version shenanigans 2026-06-05 12:46:10 -07:00
Marcos Slomp
ae275f239d adding cmake recipe file 2026-06-05 12:46:10 -07:00
Marcos Slomp
77fb86155f relocating CUDAGraphRepro "example" to the tests folder 2026-06-05 12:46:10 -07:00
Marcos Slomp
f9f772e507 quick (attempted) fix for the Linux workflow linkage error 2026-06-05 09:14:22 -07:00
Marcos Slomp
2ebf18be7f adjusting relative path 2026-06-05 08:25:59 -07:00
Marcos Slomp
9c9dca8ea5 relocating tracy test app, and consolidating github test action 2026-06-05 08:17:29 -07:00