numba-cuda 0.18.1__py3-none-any.whl → 0.19.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.
Potentially problematic release.
This version of numba-cuda might be problematic. Click here for more details.
- numba_cuda/VERSION +1 -1
- numba_cuda/numba/cuda/__init__.py +1 -1
- numba_cuda/numba/cuda/_internal/cuda_bf16.py +2 -2
- numba_cuda/numba/cuda/_internal/cuda_fp16.py +1 -1
- numba_cuda/numba/cuda/api.py +2 -7
- numba_cuda/numba/cuda/compiler.py +7 -4
- numba_cuda/numba/cuda/core/interpreter.py +3592 -0
- numba_cuda/numba/cuda/core/ir_utils.py +2645 -0
- numba_cuda/numba/cuda/core/sigutils.py +55 -0
- numba_cuda/numba/cuda/cuda_paths.py +9 -17
- numba_cuda/numba/cuda/cudadecl.py +1 -1
- numba_cuda/numba/cuda/cudadrv/driver.py +4 -19
- numba_cuda/numba/cuda/cudadrv/libs.py +1 -2
- numba_cuda/numba/cuda/cudadrv/nvrtc.py +44 -44
- numba_cuda/numba/cuda/cudadrv/nvvm.py +3 -18
- numba_cuda/numba/cuda/cudadrv/runtime.py +12 -1
- numba_cuda/numba/cuda/cudamath.py +1 -1
- numba_cuda/numba/cuda/decorators.py +4 -3
- numba_cuda/numba/cuda/deviceufunc.py +2 -1
- numba_cuda/numba/cuda/dispatcher.py +3 -2
- numba_cuda/numba/cuda/extending.py +1 -1
- numba_cuda/numba/cuda/itanium_mangler.py +211 -0
- numba_cuda/numba/cuda/libdevicedecl.py +1 -1
- numba_cuda/numba/cuda/libdevicefuncs.py +1 -1
- numba_cuda/numba/cuda/lowering.py +1 -1
- numba_cuda/numba/cuda/simulator/api.py +1 -1
- numba_cuda/numba/cuda/simulator/cudadrv/driver.py +0 -7
- numba_cuda/numba/cuda/target.py +1 -2
- numba_cuda/numba/cuda/testing.py +4 -6
- numba_cuda/numba/cuda/tests/core/test_itanium_mangler.py +80 -0
- numba_cuda/numba/cuda/tests/cudadrv/test_cuda_ndarray.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_deallocations.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_detect.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_emm_plugins.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_linker.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_managed_alloc.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_mvc.py +1 -1
- numba_cuda/numba/cuda/tests/cudadrv/test_nvrtc.py +4 -6
- numba_cuda/numba/cuda/tests/cudadrv/test_nvvm_driver.py +0 -4
- numba_cuda/numba/cuda/tests/cudadrv/test_ptds.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_bfloat16.py +1 -3
- numba_cuda/numba/cuda/tests/cudapy/test_bfloat16_bindings.py +1 -3
- numba_cuda/numba/cuda/tests/cudapy/test_caching.py +146 -3
- numba_cuda/numba/cuda/tests/cudapy/test_cffi.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_compiler.py +0 -4
- numba_cuda/numba/cuda/tests/cudapy/test_cuda_array_interface.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_cuda_jit_no_types.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_debug.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_debuginfo.py +1 -284
- numba_cuda/numba/cuda/tests/cudapy/test_debuginfo_types.py +473 -0
- numba_cuda/numba/cuda/tests/cudapy/test_device_func.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_errors.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_extending.py +1 -6
- numba_cuda/numba/cuda/tests/cudapy/test_gufunc.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_ipc.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_ir_utils.py +295 -0
- numba_cuda/numba/cuda/tests/cudapy/test_lineinfo.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_operator.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_ufuncs.py +1 -1
- numba_cuda/numba/cuda/tests/cudapy/test_warning.py +5 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_cpointer.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_cpu_gpu_compat.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_ffi.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_laplace.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_matmul.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_montecarlo.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_reduction.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_sessionize.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_ufunc.py +1 -1
- numba_cuda/numba/cuda/tests/doc_examples/test_vecadd.py +1 -1
- numba_cuda/numba/cuda/tests/nocuda/test_import.py +1 -1
- numba_cuda/numba/cuda/tests/nrt/test_nrt.py +2 -2
- numba_cuda/numba/cuda/tests/nrt/test_nrt_refct.py +1 -1
- numba_cuda/numba/cuda/tests/support.py +752 -0
- numba_cuda/numba/cuda/tests/test_binary_generation/Makefile +3 -3
- numba_cuda/numba/cuda/tests/test_binary_generation/generate_raw_ltoir.py +4 -1
- numba_cuda/numba/cuda/typing/__init__.py +8 -0
- numba_cuda/numba/cuda/typing/templates.py +1453 -0
- numba_cuda/numba/cuda/vector_types.py +3 -3
- {numba_cuda-0.18.1.dist-info → numba_cuda-0.19.0.dist-info}/METADATA +21 -28
- {numba_cuda-0.18.1.dist-info → numba_cuda-0.19.0.dist-info}/RECORD +84 -79
- numba_cuda/numba/cuda/include/11/cuda_bf16.h +0 -3749
- numba_cuda/numba/cuda/include/11/cuda_bf16.hpp +0 -2683
- numba_cuda/numba/cuda/include/11/cuda_fp16.h +0 -3794
- numba_cuda/numba/cuda/include/11/cuda_fp16.hpp +0 -2614
- {numba_cuda-0.18.1.dist-info → numba_cuda-0.19.0.dist-info}/WHEEL +0 -0
- {numba_cuda-0.18.1.dist-info → numba_cuda-0.19.0.dist-info}/licenses/LICENSE +0 -0
- {numba_cuda-0.18.1.dist-info → numba_cuda-0.19.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
from numba.cuda.testing import CUDATestCase
|
|
2
|
+
import numba
|
|
3
|
+
from numba.core.registry import cpu_target
|
|
4
|
+
from numba.core.compiler import CompilerBase, Flags
|
|
5
|
+
from numba.core.compiler_machinery import PassManager
|
|
6
|
+
from numba.cuda.core import ir_utils
|
|
7
|
+
from numba.core import types, ir, bytecode, compiler, registry
|
|
8
|
+
from numba.core.untyped_passes import (
|
|
9
|
+
ExtractByteCode,
|
|
10
|
+
TranslateByteCode,
|
|
11
|
+
FixupArgs,
|
|
12
|
+
IRProcessing,
|
|
13
|
+
)
|
|
14
|
+
from numba.experimental import jitclass
|
|
15
|
+
from numba.core.typed_passes import (
|
|
16
|
+
NopythonTypeInference,
|
|
17
|
+
type_inference_stage,
|
|
18
|
+
DeadCodeElimination,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# global constant for testing find_const
|
|
23
|
+
GLOBAL_B = 11
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@jitclass([("val", numba.core.types.List(numba.intp))])
|
|
27
|
+
class Dummy(object):
|
|
28
|
+
def __init__(self, val):
|
|
29
|
+
self.val = val
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TestIrUtils(CUDATestCase):
|
|
33
|
+
"""
|
|
34
|
+
Tests ir handling utility functions like find_callname.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def test_obj_func_match(self):
|
|
38
|
+
"""Test matching of an object method (other than Array see #3449)"""
|
|
39
|
+
|
|
40
|
+
def test_func():
|
|
41
|
+
d = Dummy([1])
|
|
42
|
+
d.val.append(2)
|
|
43
|
+
|
|
44
|
+
test_ir = compiler.run_frontend(test_func)
|
|
45
|
+
typingctx = cpu_target.typing_context
|
|
46
|
+
targetctx = cpu_target.target_context
|
|
47
|
+
typing_res = type_inference_stage(
|
|
48
|
+
typingctx, targetctx, test_ir, (), None
|
|
49
|
+
)
|
|
50
|
+
matched_call = ir_utils.find_callname(
|
|
51
|
+
test_ir, test_ir.blocks[0].body[7].value, typing_res.typemap
|
|
52
|
+
)
|
|
53
|
+
self.assertTrue(
|
|
54
|
+
isinstance(matched_call, tuple)
|
|
55
|
+
and len(matched_call) == 2
|
|
56
|
+
and matched_call[0] == "append"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
def test_dead_code_elimination(self):
|
|
60
|
+
class Tester(CompilerBase):
|
|
61
|
+
@classmethod
|
|
62
|
+
def mk_pipeline(
|
|
63
|
+
cls,
|
|
64
|
+
args,
|
|
65
|
+
return_type=None,
|
|
66
|
+
flags=None,
|
|
67
|
+
locals=None,
|
|
68
|
+
library=None,
|
|
69
|
+
typing_context=None,
|
|
70
|
+
target_context=None,
|
|
71
|
+
):
|
|
72
|
+
if locals is None:
|
|
73
|
+
locals = {}
|
|
74
|
+
if not flags:
|
|
75
|
+
flags = Flags()
|
|
76
|
+
flags.nrt = True
|
|
77
|
+
if typing_context is None:
|
|
78
|
+
typing_context = registry.cpu_target.typing_context
|
|
79
|
+
if target_context is None:
|
|
80
|
+
target_context = registry.cpu_target.target_context
|
|
81
|
+
return cls(
|
|
82
|
+
typing_context,
|
|
83
|
+
target_context,
|
|
84
|
+
library,
|
|
85
|
+
args,
|
|
86
|
+
return_type,
|
|
87
|
+
flags,
|
|
88
|
+
locals,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def compile_to_ir(self, func, DCE=False):
|
|
92
|
+
"""
|
|
93
|
+
Compile and return IR
|
|
94
|
+
"""
|
|
95
|
+
func_id = bytecode.FunctionIdentity.from_function(func)
|
|
96
|
+
self.state.func_id = func_id
|
|
97
|
+
ExtractByteCode().run_pass(self.state)
|
|
98
|
+
state = self.state
|
|
99
|
+
|
|
100
|
+
name = "DCE_testing"
|
|
101
|
+
pm = PassManager(name)
|
|
102
|
+
pm.add_pass(TranslateByteCode, "analyzing bytecode")
|
|
103
|
+
pm.add_pass(FixupArgs, "fix up args")
|
|
104
|
+
pm.add_pass(IRProcessing, "processing IR")
|
|
105
|
+
pm.add_pass(NopythonTypeInference, "nopython frontend")
|
|
106
|
+
if DCE is True:
|
|
107
|
+
pm.add_pass(DeadCodeElimination, "DCE after typing")
|
|
108
|
+
pm.finalize()
|
|
109
|
+
pm.run(state)
|
|
110
|
+
return state.func_ir
|
|
111
|
+
|
|
112
|
+
def check_initial_ir(the_ir):
|
|
113
|
+
# dead stuff:
|
|
114
|
+
# a const int value 0xdead
|
|
115
|
+
# an assign of above into to variable `dead`
|
|
116
|
+
# a const int above 0xdeaddead
|
|
117
|
+
# an assign of said int to variable `deaddead`
|
|
118
|
+
# this is 2 statements to remove
|
|
119
|
+
|
|
120
|
+
self.assertEqual(len(the_ir.blocks), 1)
|
|
121
|
+
block = the_ir.blocks[0]
|
|
122
|
+
deads = []
|
|
123
|
+
for x in block.find_insts(ir.Assign):
|
|
124
|
+
if isinstance(getattr(x, "target", None), ir.Var):
|
|
125
|
+
if "dead" in getattr(x.target, "name", ""):
|
|
126
|
+
deads.append(x)
|
|
127
|
+
|
|
128
|
+
self.assertEqual(len(deads), 2)
|
|
129
|
+
for d in deads:
|
|
130
|
+
# check the ir.Const is the definition and the value is expected
|
|
131
|
+
const_val = the_ir.get_definition(d.value)
|
|
132
|
+
self.assertTrue(
|
|
133
|
+
int("0x%s" % d.target.name, 16), const_val.value
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
return deads
|
|
137
|
+
|
|
138
|
+
def check_dce_ir(the_ir):
|
|
139
|
+
self.assertEqual(len(the_ir.blocks), 1)
|
|
140
|
+
block = the_ir.blocks[0]
|
|
141
|
+
deads = []
|
|
142
|
+
consts = []
|
|
143
|
+
for x in block.find_insts(ir.Assign):
|
|
144
|
+
if isinstance(getattr(x, "target", None), ir.Var):
|
|
145
|
+
if "dead" in getattr(x.target, "name", ""):
|
|
146
|
+
deads.append(x)
|
|
147
|
+
if isinstance(getattr(x, "value", None), ir.Const):
|
|
148
|
+
consts.append(x)
|
|
149
|
+
self.assertEqual(len(deads), 0)
|
|
150
|
+
|
|
151
|
+
# check the consts to make sure there's no reference to 0xdead or
|
|
152
|
+
# 0xdeaddead
|
|
153
|
+
for x in consts:
|
|
154
|
+
self.assertTrue(x.value.value not in [0xDEAD, 0xDEADDEAD])
|
|
155
|
+
|
|
156
|
+
def foo(x):
|
|
157
|
+
y = x + 1
|
|
158
|
+
dead = 0xDEAD # noqa
|
|
159
|
+
z = y + 2
|
|
160
|
+
deaddead = 0xDEADDEAD # noqa
|
|
161
|
+
ret = z * z
|
|
162
|
+
return ret
|
|
163
|
+
|
|
164
|
+
test_pipeline = Tester.mk_pipeline((types.intp,))
|
|
165
|
+
no_dce = test_pipeline.compile_to_ir(foo)
|
|
166
|
+
removed = check_initial_ir(no_dce)
|
|
167
|
+
|
|
168
|
+
test_pipeline = Tester.mk_pipeline((types.intp,))
|
|
169
|
+
w_dce = test_pipeline.compile_to_ir(foo, DCE=True)
|
|
170
|
+
check_dce_ir(w_dce)
|
|
171
|
+
|
|
172
|
+
# check that the count of initial - removed = dce
|
|
173
|
+
self.assertEqual(
|
|
174
|
+
len(no_dce.blocks[0].body) - len(removed), len(w_dce.blocks[0].body)
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
def test_find_const_global(self):
|
|
178
|
+
"""
|
|
179
|
+
Test find_const() for values in globals (ir.Global) and freevars
|
|
180
|
+
(ir.FreeVar) that are considered constants for compilation.
|
|
181
|
+
"""
|
|
182
|
+
FREEVAR_C = 12
|
|
183
|
+
|
|
184
|
+
def foo(a):
|
|
185
|
+
b = GLOBAL_B
|
|
186
|
+
c = FREEVAR_C
|
|
187
|
+
return a + b + c
|
|
188
|
+
|
|
189
|
+
f_ir = compiler.run_frontend(foo)
|
|
190
|
+
block = f_ir.blocks[0]
|
|
191
|
+
const_b = None
|
|
192
|
+
const_c = None
|
|
193
|
+
|
|
194
|
+
for inst in block.body:
|
|
195
|
+
if isinstance(inst, ir.Assign) and inst.target.name == "b":
|
|
196
|
+
const_b = ir_utils.guard(ir_utils.find_const, f_ir, inst.target)
|
|
197
|
+
if isinstance(inst, ir.Assign) and inst.target.name == "c":
|
|
198
|
+
const_c = ir_utils.guard(ir_utils.find_const, f_ir, inst.target)
|
|
199
|
+
|
|
200
|
+
self.assertEqual(const_b, GLOBAL_B)
|
|
201
|
+
self.assertEqual(const_c, FREEVAR_C)
|
|
202
|
+
|
|
203
|
+
def test_flatten_labels(self):
|
|
204
|
+
"""tests flatten_labels"""
|
|
205
|
+
|
|
206
|
+
def foo(a):
|
|
207
|
+
acc = 0
|
|
208
|
+
if a > 3:
|
|
209
|
+
acc += 1
|
|
210
|
+
if a > 19:
|
|
211
|
+
return 53
|
|
212
|
+
elif a < 1000:
|
|
213
|
+
if a >= 12:
|
|
214
|
+
acc += 1
|
|
215
|
+
for x in range(10):
|
|
216
|
+
acc -= 1
|
|
217
|
+
if acc < 2:
|
|
218
|
+
break
|
|
219
|
+
else:
|
|
220
|
+
acc += 7
|
|
221
|
+
else:
|
|
222
|
+
raise ValueError("some string")
|
|
223
|
+
# prevents inline of return on py310
|
|
224
|
+
py310_defeat1 = 1 # noqa
|
|
225
|
+
py310_defeat2 = 2 # noqa
|
|
226
|
+
py310_defeat3 = 3 # noqa
|
|
227
|
+
py310_defeat4 = 4 # noqa
|
|
228
|
+
return acc
|
|
229
|
+
|
|
230
|
+
def bar(a):
|
|
231
|
+
acc = 0
|
|
232
|
+
z = 12
|
|
233
|
+
if a > 3:
|
|
234
|
+
acc += 1
|
|
235
|
+
z += 12
|
|
236
|
+
if a > 19:
|
|
237
|
+
z += 12
|
|
238
|
+
return 53
|
|
239
|
+
elif a < 1000:
|
|
240
|
+
if a >= 12:
|
|
241
|
+
z += 12
|
|
242
|
+
acc += 1
|
|
243
|
+
for x in range(10):
|
|
244
|
+
z += 12
|
|
245
|
+
acc -= 1
|
|
246
|
+
if acc < 2:
|
|
247
|
+
break
|
|
248
|
+
else:
|
|
249
|
+
z += 12
|
|
250
|
+
acc += 7
|
|
251
|
+
else:
|
|
252
|
+
raise ValueError("some string")
|
|
253
|
+
py310_defeat1 = 1 # noqa
|
|
254
|
+
py310_defeat2 = 2 # noqa
|
|
255
|
+
py310_defeat3 = 3 # noqa
|
|
256
|
+
py310_defeat4 = 4 # noqa
|
|
257
|
+
return acc
|
|
258
|
+
|
|
259
|
+
def baz(a):
|
|
260
|
+
acc = 0
|
|
261
|
+
if a > 3:
|
|
262
|
+
acc += 1
|
|
263
|
+
if a > 19:
|
|
264
|
+
return 53
|
|
265
|
+
else: # extra control flow in comparison to foo
|
|
266
|
+
return 55
|
|
267
|
+
elif a < 1000:
|
|
268
|
+
if a >= 12:
|
|
269
|
+
acc += 1
|
|
270
|
+
for x in range(10):
|
|
271
|
+
acc -= 1
|
|
272
|
+
if acc < 2:
|
|
273
|
+
break
|
|
274
|
+
else:
|
|
275
|
+
acc += 7
|
|
276
|
+
else:
|
|
277
|
+
raise ValueError("some string")
|
|
278
|
+
py310_defeat1 = 1 # noqa
|
|
279
|
+
py310_defeat2 = 2 # noqa
|
|
280
|
+
py310_defeat3 = 3 # noqa
|
|
281
|
+
py310_defeat4 = 4 # noqa
|
|
282
|
+
return acc
|
|
283
|
+
|
|
284
|
+
def get_flat_cfg(func):
|
|
285
|
+
func_ir = ir_utils.compile_to_numba_ir(func, dict())
|
|
286
|
+
flat_blocks = ir_utils.flatten_labels(func_ir.blocks)
|
|
287
|
+
self.assertEqual(max(flat_blocks.keys()) + 1, len(func_ir.blocks))
|
|
288
|
+
return ir_utils.compute_cfg_from_blocks(flat_blocks)
|
|
289
|
+
|
|
290
|
+
foo_cfg = get_flat_cfg(foo)
|
|
291
|
+
bar_cfg = get_flat_cfg(bar)
|
|
292
|
+
baz_cfg = get_flat_cfg(baz)
|
|
293
|
+
|
|
294
|
+
self.assertEqual(foo_cfg, bar_cfg)
|
|
295
|
+
self.assertNotEqual(foo_cfg, baz_cfg)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from numba import cuda, float32, int32
|
|
2
2
|
from numba.core.errors import NumbaInvalidConfigWarning
|
|
3
3
|
from numba.cuda.testing import CUDATestCase, skip_on_cudasim
|
|
4
|
-
from numba.tests.support import ignore_internal_warnings
|
|
4
|
+
from numba.cuda.tests.support import ignore_internal_warnings
|
|
5
5
|
import re
|
|
6
6
|
import unittest
|
|
7
7
|
import warnings
|
|
@@ -9,7 +9,7 @@ from numba.cuda.testing import (
|
|
|
9
9
|
from numba import cuda
|
|
10
10
|
from numba.core import types
|
|
11
11
|
from numba.core.types import f2, b1
|
|
12
|
-
from numba.
|
|
12
|
+
from numba.cuda.typing import signature
|
|
13
13
|
import operator
|
|
14
14
|
import itertools
|
|
15
15
|
from numba.np.numpy_support import from_dtype
|
|
@@ -6,7 +6,11 @@ from numba.cuda.testing import (
|
|
|
6
6
|
CUDATestCase,
|
|
7
7
|
skip_on_cudasim,
|
|
8
8
|
)
|
|
9
|
-
from numba.tests.support import
|
|
9
|
+
from numba.cuda.tests.support import (
|
|
10
|
+
linux_only,
|
|
11
|
+
override_config,
|
|
12
|
+
run_in_subprocess,
|
|
13
|
+
)
|
|
10
14
|
from numba.core.errors import NumbaPerformanceWarning
|
|
11
15
|
from numba.core import config
|
|
12
16
|
import warnings
|
|
@@ -9,7 +9,7 @@ Contents in this file are referenced from the sphinx-generated docs.
|
|
|
9
9
|
|
|
10
10
|
import unittest
|
|
11
11
|
from numba.cuda.testing import CUDATestCase, skip_on_cudasim
|
|
12
|
-
from numba.tests.support import captured_stdout
|
|
12
|
+
from numba.cuda.tests.support import captured_stdout
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
@skip_on_cudasim("cudasim doesn't support cuda import at non-top-level")
|
|
@@ -4,13 +4,13 @@ import os
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import unittest
|
|
6
6
|
from numba.cuda.testing import CUDATestCase, skip_on_cudasim
|
|
7
|
-
from numba.tests.support import run_in_subprocess, override_config
|
|
7
|
+
from numba.cuda.tests.support import run_in_subprocess, override_config
|
|
8
8
|
from numba.cuda import get_current_device
|
|
9
9
|
from numba.cuda.cudadrv.nvrtc import compile
|
|
10
10
|
from numba import config, types
|
|
11
11
|
from numba.core.typing import signature
|
|
12
12
|
from numba import cuda
|
|
13
|
-
from numba.
|
|
13
|
+
from numba.cuda.typing.templates import AbstractTemplate
|
|
14
14
|
from numba.cuda.cudadrv.linkable_code import (
|
|
15
15
|
CUSource,
|
|
16
16
|
PTXSource,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import unittest
|
|
3
|
-
from numba.tests.support import override_config
|
|
3
|
+
from numba.cuda.tests.support import override_config
|
|
4
4
|
from numba.cuda.memory_management import rtsys
|
|
5
5
|
from numba.cuda.tests.support import EnableNRTStatsMixin
|
|
6
6
|
from numba.cuda.testing import CUDATestCase, skip_on_cudasim
|