From 224ff6d0e8357f5ccb2d987ff7e1b079eabdc086 Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Wed, 3 Jun 2026 11:05:06 -0700 Subject: [PATCH] bumping "down" CUDA version --- manual/tracy.tex | 2 +- public/tracy/TracyCUDA.hpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/manual/tracy.tex b/manual/tracy.tex index 014dcbfb..123ce80c 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -1773,7 +1773,7 @@ Similar to Vulkan and OpenGL, you also need to periodically collect the OpenCL e \subsubsection{CUDA} -CUDA support is enabled by including the \texttt{public/tracy/TracyCUDA.hpp} header file. To use it, make sure you have the NVIDIA CUDA Toolkit v12.8 (or later) installed, and that the NVIDIA CUPTI library is available in the toolkit (located at \texttt{CUDA\_INSTALLATION\_PATH/extras/CUPTI}). +CUDA support is enabled by including the \texttt{public/tracy/TracyCUDA.hpp} header file. To use it, make sure you have the NVIDIA CUDA Toolkit v12.4 (or later) installed, and that the NVIDIA CUPTI library is available in the toolkit (located at \texttt{CUDA\_INSTALLATION\_PATH/extras/CUPTI}). Tracing CUDA requires the creation of a Tracy CUDA context using the macro \texttt{TracyCUDAContext()}, which returns an instance of a \texttt{tracy::CUDACtx} object. TracyCUDA allows only a single \texttt{tracy::CUDACtx} object at any given time. Subsequent calls to \texttt{TracyCUDAContext()} will return the same reference-counted object. There is no need for clients to instantiate multiple \texttt{tracy::CUDACtx} objects, as a single context is capable of instrumenting all CUDA contexts and streams. diff --git a/public/tracy/TracyCUDA.hpp b/public/tracy/TracyCUDA.hpp index 7a297146..c5134807 100644 --- a/public/tracy/TracyCUDA.hpp +++ b/public/tracy/TracyCUDA.hpp @@ -19,8 +19,8 @@ using CUDACtx = std::nullptr_t; #else #include -#if CUDA_VERSION < 12080 -#error "CUDA v12.8 (or later) is required by TracyCUDA.hpp" +#if CUDA_VERSION < 12040 +#error "CUDA v12.4 (or later) is required by TracyCUDA.hpp" #endif #include @@ -1215,8 +1215,15 @@ namespace tracy { // NOTE(marcos): a byproduct of CUPTI_ACTIVITY_KIND_SYNCHRONIZATION // (I think this is related to cudaEvent*() API calls) +#if CUDA_VERSION < 12080 + // prior to CUDA v12.8 + CUpti_ActivityCudaEvent* event = (CUpti_ActivityCudaEvent*)record; + UNREFERENCED(event); +#else + // starting from CUDA v12.8 CUpti_ActivityCudaEvent2* event = (CUpti_ActivityCudaEvent2*)record; UNREFERENCED(event); +#endif break; } default: