Skip to content

Commit 6ed6f6c

Browse files
authored
avoid triggering module-level delattr (#1237)
1 parent 9aaa671 commit 6ed6f6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cuda_core/cuda/core/experimental/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
try:
6-
import cuda.bindings
6+
from cuda import bindings
77
except ImportError:
88
raise ImportError("cuda.bindings 12.x or 13.x must be installed") from None
99
else:
10-
cuda_major, cuda_minor = cuda.bindings.__version__.split(".")[:2]
10+
cuda_major, cuda_minor = bindings.__version__.split(".")[:2]
1111
if cuda_major not in ("12", "13"):
1212
raise ImportError("cuda.bindings 12.x or 13.x must be installed")
1313

@@ -24,7 +24,7 @@
2424
else:
2525
del versioned_mod
2626
finally:
27-
del cuda.bindings, importlib, subdir, cuda_major, cuda_minor
27+
del bindings, importlib, subdir, cuda_major, cuda_minor
2828

2929
from cuda.core.experimental import utils # noqa: E402
3030
from cuda.core.experimental._device import Device # noqa: E402

0 commit comments

Comments
 (0)