numba-cuda 0.14.0__py3-none-any.whl → 0.15.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- numba_cuda/VERSION +1 -1
- numba_cuda/numba/cuda/__init__.py +31 -0
- numba_cuda/numba/cuda/cudadrv/driver.py +8 -26
- numba_cuda/numba/cuda/cudadrv/mappings.py +2 -2
- numba_cuda/numba/cuda/tests/cudadrv/test_linker.py +0 -2
- numba_cuda/numba/cuda/tests/cudadrv/test_module_callbacks.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_nvjitlink.py +0 -2
- {numba_cuda-0.14.0.dist-info → numba_cuda-0.15.0.dist-info}/METADATA +3 -1
- {numba_cuda-0.14.0.dist-info → numba_cuda-0.15.0.dist-info}/RECORD +12 -12
- {numba_cuda-0.14.0.dist-info → numba_cuda-0.15.0.dist-info}/WHEEL +0 -0
- {numba_cuda-0.14.0.dist-info → numba_cuda-0.15.0.dist-info}/licenses/LICENSE +0 -0
- {numba_cuda-0.14.0.dist-info → numba_cuda-0.15.0.dist-info}/top_level.txt +0 -0
numba_cuda/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.15.0
|
@@ -1,5 +1,36 @@
|
|
1
|
+
import importlib
|
1
2
|
from numba import runtests
|
2
3
|
from numba.core import config
|
4
|
+
from .utils import _readenv
|
5
|
+
|
6
|
+
# Enable pynvjitlink if the environment variables NUMBA_CUDA_ENABLE_PYNVJITLINK
|
7
|
+
# or CUDA_ENABLE_PYNVJITLINK are set, or if the pynvjitlink module is found. If
|
8
|
+
# explicitly disabled, do not use pynvjitlink, even if present in the env.
|
9
|
+
_pynvjitlink_enabled_in_env = _readenv(
|
10
|
+
"NUMBA_CUDA_ENABLE_PYNVJITLINK", bool, None
|
11
|
+
)
|
12
|
+
_pynvjitlink_enabled_in_cfg = getattr(config, "CUDA_ENABLE_PYNVJITLINK", None)
|
13
|
+
|
14
|
+
if _pynvjitlink_enabled_in_env is not None:
|
15
|
+
ENABLE_PYNVJITLINK = _pynvjitlink_enabled_in_env
|
16
|
+
elif _pynvjitlink_enabled_in_cfg is not None:
|
17
|
+
ENABLE_PYNVJITLINK = _pynvjitlink_enabled_in_cfg
|
18
|
+
else:
|
19
|
+
ENABLE_PYNVJITLINK = importlib.util.find_spec("pynvjitlink") is not None
|
20
|
+
|
21
|
+
if not hasattr(config, "CUDA_ENABLE_PYNVJITLINK"):
|
22
|
+
config.CUDA_ENABLE_PYNVJITLINK = ENABLE_PYNVJITLINK
|
23
|
+
|
24
|
+
# Upstream numba sets CUDA_USE_NVIDIA_BINDING to 0 by default, so it always
|
25
|
+
# exists. Override, but not if explicitly set to 0 in the envioronment.
|
26
|
+
_nvidia_binding_enabled_in_env = _readenv(
|
27
|
+
"NUMBA_CUDA_USE_NVIDIA_BINDING", bool, None
|
28
|
+
)
|
29
|
+
if _nvidia_binding_enabled_in_env is False:
|
30
|
+
USE_NV_BINDING = False
|
31
|
+
else:
|
32
|
+
USE_NV_BINDING = True
|
33
|
+
config.CUDA_USE_NVIDIA_BINDING = USE_NV_BINDING
|
3
34
|
|
4
35
|
if config.ENABLE_CUDASIM:
|
5
36
|
from .simulator_init import *
|
@@ -49,7 +49,7 @@ from .drvapi import API_PROTOTYPES
|
|
49
49
|
from .drvapi import cu_occupancy_b2d_size, cu_stream_callback_pyobj, cu_uuid
|
50
50
|
from .mappings import FILE_EXTENSION_MAP
|
51
51
|
from .linkable_code import LinkableCode, LTOIR, Fatbin, Object
|
52
|
-
from numba.cuda.utils import
|
52
|
+
from numba.cuda.utils import cached_file_read
|
53
53
|
from numba.cuda.cudadrv import enums, drvapi, nvrtc
|
54
54
|
|
55
55
|
try:
|
@@ -57,15 +57,6 @@ try:
|
|
57
57
|
except ImportError:
|
58
58
|
NvJitLinker, NvJitLinkError = None, None
|
59
59
|
|
60
|
-
USE_NV_BINDING = config.CUDA_USE_NVIDIA_BINDING
|
61
|
-
|
62
|
-
if USE_NV_BINDING:
|
63
|
-
from cuda import cuda as binding
|
64
|
-
|
65
|
-
# There is no definition of the default stream in the Nvidia bindings (nor
|
66
|
-
# is there at the C/C++ level), so we define it here so we don't need to
|
67
|
-
# use a magic number 0 in places where we want the default stream.
|
68
|
-
CU_STREAM_DEFAULT = 0
|
69
60
|
|
70
61
|
MIN_REQUIRED_CC = (3, 5)
|
71
62
|
SUPPORTS_IPC = sys.platform.startswith("linux")
|
@@ -82,23 +73,15 @@ _MVC_ERROR_MESSAGE = (
|
|
82
73
|
"to be available"
|
83
74
|
)
|
84
75
|
|
85
|
-
|
86
|
-
# or CUDA_ENABLE_PYNVJITLINK are set, or if the pynvjitlink module is found. If
|
87
|
-
# explicitly disabled, do not use pynvjitlink, even if present in the env.
|
88
|
-
_pynvjitlink_enabled_in_env = _readenv(
|
89
|
-
"NUMBA_CUDA_ENABLE_PYNVJITLINK", bool, None
|
90
|
-
)
|
91
|
-
_pynvjitlink_enabled_in_cfg = getattr(config, "CUDA_ENABLE_PYNVJITLINK", None)
|
76
|
+
USE_NV_BINDING = config.CUDA_USE_NVIDIA_BINDING
|
92
77
|
|
93
|
-
if
|
94
|
-
|
95
|
-
elif _pynvjitlink_enabled_in_cfg is not None:
|
96
|
-
ENABLE_PYNVJITLINK = _pynvjitlink_enabled_in_cfg
|
97
|
-
else:
|
98
|
-
ENABLE_PYNVJITLINK = importlib.util.find_spec("pynvjitlink") is not None
|
78
|
+
if USE_NV_BINDING:
|
79
|
+
from cuda.bindings import driver as binding
|
99
80
|
|
100
|
-
|
101
|
-
|
81
|
+
# There is no definition of the default stream in the Nvidia bindings (nor
|
82
|
+
# is there at the C/C++ level), so we define it here so we don't need to
|
83
|
+
# use a magic number 0 in places where we want the default stream.
|
84
|
+
CU_STREAM_DEFAULT = 0
|
102
85
|
|
103
86
|
|
104
87
|
def make_logger():
|
@@ -3192,7 +3175,6 @@ class CudaPythonLinker(Linker):
|
|
3192
3175
|
|
3193
3176
|
raw_keys = list(options.keys())
|
3194
3177
|
raw_values = list(options.values())
|
3195
|
-
|
3196
3178
|
self.handle = driver.cuLinkCreate(len(raw_keys), raw_keys, raw_values)
|
3197
3179
|
|
3198
3180
|
weakref.finalize(self, driver.cuLinkDestroy, self.handle)
|
@@ -2,9 +2,9 @@ from numba import config
|
|
2
2
|
from . import enums
|
3
3
|
|
4
4
|
if config.CUDA_USE_NVIDIA_BINDING:
|
5
|
-
from cuda import
|
5
|
+
from cuda.bindings import driver
|
6
6
|
|
7
|
-
jitty =
|
7
|
+
jitty = driver.CUjitInputType
|
8
8
|
FILE_EXTENSION_MAP = {
|
9
9
|
"o": jitty.CU_JIT_INPUT_OBJECT,
|
10
10
|
"ptx": jitty.CU_JIT_INPUT_PTX,
|
@@ -104,8 +104,6 @@ def simple_lmem(A, B, dty):
|
|
104
104
|
|
105
105
|
@skip_on_cudasim("Linking unsupported in the simulator")
|
106
106
|
class TestLinker(CUDATestCase):
|
107
|
-
_NUMBA_NVIDIA_BINDING_0_ENV = {"NUMBA_CUDA_USE_NVIDIA_BINDING": "0"}
|
108
|
-
|
109
107
|
@require_context
|
110
108
|
def test_linker_basic(self):
|
111
109
|
"""Simply go through the constructor and destructor"""
|
@@ -15,7 +15,7 @@ if not config.ENABLE_CUDASIM:
|
|
15
15
|
from cuda.bindings.driver import cuModuleGetGlobal, cuMemcpyHtoD
|
16
16
|
|
17
17
|
if config.CUDA_USE_NVIDIA_BINDING:
|
18
|
-
from cuda.
|
18
|
+
from cuda.bindings.driver import CUmodule as cu_module_type
|
19
19
|
else:
|
20
20
|
from numba.cuda.cudadrv.drvapi import cu_module as cu_module_type
|
21
21
|
|
@@ -57,8 +57,6 @@ if TEST_BIN_DIR:
|
|
57
57
|
)
|
58
58
|
@skip_on_cudasim("Linking unsupported in the simulator")
|
59
59
|
class TestLinker(CUDATestCase):
|
60
|
-
_NUMBA_NVIDIA_BINDING_0_ENV = {"NUMBA_CUDA_USE_NVIDIA_BINDING": "0"}
|
61
|
-
|
62
60
|
def test_nvjitlink_create(self):
|
63
61
|
patched_linker = PyNvJitLinker(cc=(7, 5))
|
64
62
|
assert "-arch=sm_75" in patched_linker.options
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: numba-cuda
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.15.0
|
4
4
|
Summary: CUDA target for Numba
|
5
5
|
Author: Anaconda Inc., NVIDIA Corporation
|
6
6
|
License: BSD 2-clause
|
@@ -13,11 +13,13 @@ Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
14
14
|
Requires-Dist: numba>=0.59.1
|
15
15
|
Provides-Extra: cu11
|
16
|
+
Requires-Dist: cuda-bindings==11.8.*; extra == "cu11"
|
16
17
|
Requires-Dist: cuda-python==11.8.*; extra == "cu11"
|
17
18
|
Requires-Dist: nvidia-cuda-nvcc-cu11; extra == "cu11"
|
18
19
|
Requires-Dist: nvidia-cuda-runtime-cu11; extra == "cu11"
|
19
20
|
Requires-Dist: nvidia-cuda-nvrtc-cu11; extra == "cu11"
|
20
21
|
Provides-Extra: cu12
|
22
|
+
Requires-Dist: cuda-bindings==12.9.*; extra == "cu12"
|
21
23
|
Requires-Dist: cuda-python==12.9.*; extra == "cu12"
|
22
24
|
Requires-Dist: nvidia-cuda-nvcc-cu12; extra == "cu12"
|
23
25
|
Requires-Dist: nvidia-cuda-runtime-cu12; extra == "cu12"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
_numba_cuda_redirector.pth,sha256=cmfMMmV0JPh3yEpl4bGeM9AuXiVVMSo6Z_b7RaQL3XE,30
|
2
2
|
_numba_cuda_redirector.py,sha256=n_r8MYbu5-vcXMnLJW147k8DnFXXvgb7nPIXnlXwTyQ,2659
|
3
|
-
numba_cuda/VERSION,sha256
|
3
|
+
numba_cuda/VERSION,sha256=-EBaczDChwKNRww-41Bvh48a2F7XnB0a3BnfL_c5iRU,7
|
4
4
|
numba_cuda/__init__.py,sha256=atXeUvJKR3JHcAiCFbXCVOJQUHgB1TulmsqSL_9RT3Q,114
|
5
5
|
numba_cuda/_version.py,sha256=nzrrJXi85d18m6SPdsPsetJNClDETkmF1MrEhGLYDBs,734
|
6
|
-
numba_cuda/numba/cuda/__init__.py,sha256=
|
6
|
+
numba_cuda/numba/cuda/__init__.py,sha256=Di4bHKnDtTgiHC4kdEM-BRLC6MTTmDRGCpPNiNDUd_0,1842
|
7
7
|
numba_cuda/numba/cuda/api.py,sha256=mkbZBcBfm819kCywQbH8jAvUex2m4pYTcFD-LE-tXsQ,17638
|
8
8
|
numba_cuda/numba/cuda/api_util.py,sha256=jK8oUD3zf_D5IX7vbjc3uY_5kmOxwgEqO2m_lDHdWfM,861
|
9
9
|
numba_cuda/numba/cuda/args.py,sha256=UlTHTJpwPeCtnW0Bb-Wetm5UO9TPR-PCgIt5ys8b8tQ,1894
|
@@ -52,14 +52,14 @@ numba_cuda/numba/cuda/_internal/cuda_bf16.py,sha256=QYck6s_D85HBEsc__SAl_UZxf7Sp
|
|
52
52
|
numba_cuda/numba/cuda/cudadrv/__init__.py,sha256=inat2K8K1OVrgDe64FK7CyRmyFyNKcNO4p2_L79yRZ0,201
|
53
53
|
numba_cuda/numba/cuda/cudadrv/devicearray.py,sha256=6tF2TYnmjMbKk2fho1ONoD_QsRD9QVTT2kHP7x1u1J0,31556
|
54
54
|
numba_cuda/numba/cuda/cudadrv/devices.py,sha256=k87EDIRhj1ncM9PxJCjZGPFfEks99vzmHlTc55GK5X0,8062
|
55
|
-
numba_cuda/numba/cuda/cudadrv/driver.py,sha256=
|
55
|
+
numba_cuda/numba/cuda/cudadrv/driver.py,sha256=sa6kq9Bhk2C4OvLH6Bh3S-G8CnnsKewVZsEKc_6Wkps,118849
|
56
56
|
numba_cuda/numba/cuda/cudadrv/drvapi.py,sha256=OnjYWnmy8ZlSfYouhzyYIpW-AJ3x1YHj32YcBY2xet4,16790
|
57
57
|
numba_cuda/numba/cuda/cudadrv/dummyarray.py,sha256=2jycZhniMy3ncoVWQG9D8dBehTEeocBZTW43gKHL5Tc,14291
|
58
58
|
numba_cuda/numba/cuda/cudadrv/enums.py,sha256=raWKryxamWQZ5A8ivMpyYVhhwbSpaD9lu7l1_wl2W9M,23742
|
59
59
|
numba_cuda/numba/cuda/cudadrv/error.py,sha256=C2tTPT5h3BGgzjaFTCqbY7hOk2PgkVh0iuM1EiRp1eI,583
|
60
60
|
numba_cuda/numba/cuda/cudadrv/libs.py,sha256=qjknQxYXd2ucwDLQqzhWC_srNg6FnwvcVHIpKyPxJ9A,7287
|
61
61
|
numba_cuda/numba/cuda/cudadrv/linkable_code.py,sha256=IZ13laEG_altDQyi9HkdMcwW-YYEIn2erqz6AnYsqHg,2808
|
62
|
-
numba_cuda/numba/cuda/cudadrv/mappings.py,sha256=
|
62
|
+
numba_cuda/numba/cuda/cudadrv/mappings.py,sha256=M10CEqzEBzMRjSm8aiwkrvUy06zF3NQfv64c9QEF_Ek,817
|
63
63
|
numba_cuda/numba/cuda/cudadrv/ndarray.py,sha256=HtULWWFyDlgqvrH5459yyPTvU4UbUo2DSdtcNfvbH00,473
|
64
64
|
numba_cuda/numba/cuda/cudadrv/nvrtc.py,sha256=UD8kASyGUU896tNWAtVxmbzDTP5jDbiOAZjCsELOg6U,14986
|
65
65
|
numba_cuda/numba/cuda/cudadrv/nvvm.py,sha256=2vq00bifcNvQQGbp0IUaStlFLM5faU9weQ2poWSB0a4,29637
|
@@ -126,11 +126,11 @@ numba_cuda/numba/cuda/tests/cudadrv/test_host_alloc.py,sha256=ciy4dAK6-qrf1f8X_x
|
|
126
126
|
numba_cuda/numba/cuda/tests/cudadrv/test_init.py,sha256=mRcGOJWTUpZ533EWq4Tbp3D_aHFFcVS6c_iZqhId7I0,4494
|
127
127
|
numba_cuda/numba/cuda/tests/cudadrv/test_inline_ptx.py,sha256=B_fYsBUpd9SxYSOmuWuSFbb6JAiA90HhiVeTSuYVb8c,1280
|
128
128
|
numba_cuda/numba/cuda/tests/cudadrv/test_is_fp16.py,sha256=0KPe4E9wOZsSV_0QI0LmjUeMTjWpYT8BXExUUsmUCDI,394
|
129
|
-
numba_cuda/numba/cuda/tests/cudadrv/test_linker.py,sha256=
|
129
|
+
numba_cuda/numba/cuda/tests/cudadrv/test_linker.py,sha256=0jU-kakHDIWEmwkyorwqt89-E9Mq8Um1DIxc32_jePE,10059
|
130
130
|
numba_cuda/numba/cuda/tests/cudadrv/test_managed_alloc.py,sha256=2tkf766GjIta_wL5NGlMIqmrDMFN2rZmnP_c9A8cWA8,5084
|
131
|
-
numba_cuda/numba/cuda/tests/cudadrv/test_module_callbacks.py,sha256=
|
131
|
+
numba_cuda/numba/cuda/tests/cudadrv/test_module_callbacks.py,sha256=qZj2KfiCJ9mPMwJ5Yhvdyx1gfoi8qnp8dERKTSylsrM,8424
|
132
132
|
numba_cuda/numba/cuda/tests/cudadrv/test_mvc.py,sha256=9MLFEXn7DnLkuuXK_qjilA1jxQwC-AeSBOcRYzZogRY,1513
|
133
|
-
numba_cuda/numba/cuda/tests/cudadrv/test_nvjitlink.py,sha256=
|
133
|
+
numba_cuda/numba/cuda/tests/cudadrv/test_nvjitlink.py,sha256=HF1rWokC5FKZtnnq_1uUHon4hEWK0BCfYYKSC2pdoHw,11477
|
134
134
|
numba_cuda/numba/cuda/tests/cudadrv/test_nvvm_driver.py,sha256=71-Hlng6-HyhfK3i3ITUzHQIHyL3hCv1ubkkJOGt0R4,7400
|
135
135
|
numba_cuda/numba/cuda/tests/cudadrv/test_pinned.py,sha256=PGuv4bt9qiIGlkLhyQCOXFIf1SK5Nj-RjcpWqeO1TMM,943
|
136
136
|
numba_cuda/numba/cuda/tests/cudadrv/test_profiler.py,sha256=xbSFmvqOIcWY-TI9p1MDcGwE-24iaK4j-_UenMvTnR4,508
|
@@ -274,8 +274,8 @@ numba_cuda/numba/cuda/tests/test_binary_generation/generate_raw_ltoir.py,sha256=
|
|
274
274
|
numba_cuda/numba/cuda/tests/test_binary_generation/nrt_extern.cu,sha256=T9ubst3fFUK7EXyXXMi73wAban3VFFQ986cY5OcKfvI,157
|
275
275
|
numba_cuda/numba/cuda/tests/test_binary_generation/test_device_functions.cu,sha256=IB5t-dVhrKVoue3AbUx3yVMxPG0hBF_yZbzb4642sf0,538
|
276
276
|
numba_cuda/numba/cuda/tests/test_binary_generation/undefined_extern.cu,sha256=q3oxZziT8KDodeNcEBiWULH6vMrHCWucmJmtrg8C0d0,128
|
277
|
-
numba_cuda-0.
|
278
|
-
numba_cuda-0.
|
279
|
-
numba_cuda-0.
|
280
|
-
numba_cuda-0.
|
281
|
-
numba_cuda-0.
|
277
|
+
numba_cuda-0.15.0.dist-info/licenses/LICENSE,sha256=eHeYE-XjASmwbxfsP5AImgfzRwZurZGqH1f6OFwJ4io,1326
|
278
|
+
numba_cuda-0.15.0.dist-info/METADATA,sha256=gSh_itJMZcyqWFtoZNvw0QXPigNFA6x5lbxDvtduBb4,2907
|
279
|
+
numba_cuda-0.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
280
|
+
numba_cuda-0.15.0.dist-info/top_level.txt,sha256=C50SsH-8tXDmt7I0Y3nlJYhS5s6pqWflCPdobe9vx2M,11
|
281
|
+
numba_cuda-0.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|