From 6659669068521f5dbaa3516909e449b04c8cbf16 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 25 Apr 2024 16:20:00 +0200 Subject: [PATCH] Fix #2343. --- src/compiler/reflection.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/reflection.jl b/src/compiler/reflection.jl index 513157b205..aaa9e12cc4 100644 --- a/src/compiler/reflection.jl +++ b/src/compiler/reflection.jl @@ -88,6 +88,16 @@ function code_sass(f::Base.Callable, io::IO=stdout; raw::Bool=false) return end + # NVIDIA bug #4604961: CUPTI in CUDA 12.4 Update 1 does not capture profiled events + # unless the activity API is first activated + if runtime_version() == v"12.4" + cfg = CUPTI.ActivityConfig([CUPTI.CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL, + CUPTI.CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API]) + CUPTI.enable!(cfg) do + # do nothing + end + end + seen_modules = Set{UInt32}() cfg = CUPTI.CallbackConfig([CUPTI.CUPTI_CB_DOMAIN_RESOURCE]) do domain, id, data # only process relevant callbacks