Skip to content

Commit e9e87d3

Browse files
committed
Modify the import on the observer.
1 parent 881db4d commit e9e87d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kernel_tuner/backends/nvcuda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
try:
1414
from cuda.bindings import driver, runtime, nvrtc
1515
except ImportError:
16-
driver = None
16+
cuda = None
1717

1818

1919
class CudaFunctions(GPUBackend):
@@ -39,7 +39,7 @@ def __init__(self, device=0, iterations=7, compiler_options=None, observers=None
3939
"""
4040
self.allocations = []
4141
self.texrefs = []
42-
if not driver:
42+
if not cuda:
4343
raise ImportError(
4444
"cuda-python not installed, install using 'pip install cuda-python', or check https://kerneltuner.github.io/kernel_tuner/stable/install.html#cuda-and-pycuda."
4545
)

kernel_tuner/observers/nvcuda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import numpy as np
22

33
try:
4-
from cuda import cudart
4+
from cuda.bindings import cudart
55
except ImportError:
66
cuda = None
77

88
from kernel_tuner.observers.observer import BenchmarkObserver
9-
from kernel_tuner.util import cuda_error_check
9+
from kernel_tuner.utils.nvcuda import cuda_error_check
1010

1111

1212
class CudaRuntimeObserver(BenchmarkObserver):

0 commit comments

Comments
 (0)