Skip to content

Commit ecb53f7

Browse files
authored
Use CUDA-Python to get CUDA runtime version
1 parent 0501b50 commit ecb53f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/cugraph/cugraph/tests/data_store/test_gnn_feat_storage_wholegraph.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import numpy as np
1616
import os
1717

18-
import numba.cuda
18+
from cuda.bindings import runtime as cuda_runtime
1919

2020
from cugraph.gnn import FeatureStore
2121

@@ -28,8 +28,10 @@
2828

2929

3030
def get_cudart_version():
31-
major, minor = numba.cuda.runtime.get_version()
32-
return major * 1000 + minor * 10
31+
status, version = cuda_runtime.getLocalRuntimeVersion()
32+
if status != cuda_runtime.cudaError_t.cudaSuccess:
33+
raise RuntimeError(f"CUDA Error: {status}")
34+
return version
3335

3436

3537
pytestmark = [

0 commit comments

Comments
 (0)