Skip to content

Commit 2641d33

Browse files
committed
fix the ctk version detection
1 parent 9fb6f3a commit 2641d33

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

numba_cuda/numba/cuda/debuginfo.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ def _check_polymorphic_debug_info_support():
3737
- use_typed_const: True for typed constant,
3838
False for node reference
3939
"""
40-
ctk_version = runtime.getLocalRuntimeVersion()
40+
# runtime.getLocalRuntimeVersion() returns (cudaError_t, version_int)
41+
# Example: 13010 = CTK 13.1, 13020 = CTK 13.2
42+
_, ctk_version_number = runtime.getLocalRuntimeVersion()
43+
ctk_major = ctk_version_number // 1000
44+
ctk_minor = (ctk_version_number % 1000) // 10
45+
ctk_version = (ctk_major, ctk_minor)
46+
4147
llvmlite_version = _get_llvmlite_version()
4248

4349
# Support not available with CTK 13.1 or older

0 commit comments

Comments
 (0)