File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change
1
+ # https://docs.nvidia.com/cupti/api/group__CUPTI__VERSION__API.html
2
+ const cupti_versions = [
3
+ v " 4.0" ,
4
+ v " 4.1" ,
5
+ v " 5.0" ,
6
+ v " 5.5" ,
7
+ v " 6.0" ,
8
+ v " 6.5" ,
9
+ v " 6.5.1" , # with sm_52 support
10
+ v " 7.0" ,
11
+ v " 8.0" ,
12
+ v " 9.0" ,
13
+ v " 9.1" ,
14
+ v " 10.0" , # and v10.1 and v10.2
15
+ v " 11.0" ,
16
+ v " 11.1" ,
17
+ v " 11.2" , # and v11.3 and v11.4
18
+ v " 11.5" ,
19
+ v " 11.6" ,
20
+ v " 11.8" ,
21
+ v " 12.0" ,
22
+ v " 12.2" ,
23
+ v " 12.3" ,
24
+ v " 12.4" ,
25
+ v " 12.5" ,
26
+ v " 12.6" ,
27
+ v " 12.8" ,
28
+ v " 12.9" ,
29
+ v " 12.9.1" ]
30
+
1
31
function version ()
2
32
version_ref = Ref {Cuint} ()
3
33
cuptiGetVersion (version_ref)
4
- VersionNumber (version_ref[])
34
+ if CUDA. runtime_version () < v " 13"
35
+ cupti_versions[version_ref[]]
36
+ else
37
+ major, ver = divrem (version_ref[], 10000 )
38
+ minor, patch = divrem (ver, 100 )
39
+ VersionNumber (major, minor, patch)
40
+ end
5
41
end
6
42
7
43
# XXX : `cuptiGetVersion` returns something more like the API version, and doesn't change
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ function __init__()
160
160
end
161
161
162
162
# if we're not running under an external profiler, let CUPTI handle NVTX events
163
- if ! NVTX. isactive () && toolkit_version < v " 13" # NVIDIA/NVTX#125
163
+ if ! NVTX. isactive () && CUPTI . version () != v " 13.0 " # NVIDIA/NVTX#125
164
164
ENV [" NVTX_INJECTION64_PATH" ] = CUDA_Runtime. libcupti
165
165
NVTX. activate ()
166
166
end
You can’t perform that action at this time.
0 commit comments