Skip to content

Commit fd46752

Browse files
merge/resolve
2 parents 8bcf91f + b4df85c commit fd46752

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1088
-221
lines changed

ci/test_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "Package path: ${package}"
1313
DEPENDENCIES=(
1414
"${package}"
1515
"cuda-python==${CUDA_VER_MAJOR_MINOR%.*}.*"
16-
"cuda-core==0.3.*"
16+
"cuda-core>=0.3.0,<1.0.0"
1717
"--group"
1818
"test"
1919
)

conda/recipes/numba-cuda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ requirements:
3030
- python
3131
- numba >=0.59.1
3232
- cuda-bindings >=12.9.1
33-
- cuda-core ==0.3.*
33+
- cuda-core >=0.3.0,<1.0.0
3434

3535
about:
3636
home: {{ project_urls["Homepage"] }}

numba_cuda/numba/cuda/_internal/cuda_fp16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from numba.cuda import types
2222
from numba.cuda.cudadrv.driver import _have_nvjitlink
2323
from numba.cuda.datamodel import PrimitiveModel, StructModel
24-
from numba.core.errors import NumbaPerformanceWarning
24+
from numba.cuda.core.errors import NumbaPerformanceWarning
2525
from numba.cuda.extending import (
2626
lower_cast,
2727
make_attribute_wrapper,

numba_cuda/numba/cuda/compiler.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
from warnings import warn, catch_warnings, simplefilter
77
import copy
88

9-
from numba.core import ir as numba_ir
10-
from numba.core import bytecode
9+
from numba.cuda.core import ir as numba_ir
10+
from numba.cuda.core import bytecode
1111
from numba.cuda import types
1212
from numba.cuda.core.options import ParallelOptions
1313
from numba.core.compiler_lock import global_compiler_lock
14-
from numba.core.errors import NumbaWarning, NumbaInvalidConfigWarning
14+
from numba.cuda.core.errors import NumbaWarning, NumbaInvalidConfigWarning
1515
from numba.cuda.core.interpreter import Interpreter
1616

1717
from numba.cuda import cgutils, typing, lowering, nvvmutils, utils
@@ -741,10 +741,7 @@ def compile_cuda(
741741
flags.max_registers = max_registers
742742
flags.lto = lto
743743

744-
# Run compilation pipeline
745-
from numba.core.target_extension import target_override
746-
747-
with target_override("cuda"):
744+
with utils.numba_target_override():
748745
cres = compile_extra(
749746
typingctx=typingctx,
750747
targetctx=targetctx,

numba_cuda/numba/cuda/core/analysis.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
from collections import namedtuple, defaultdict
55
from numba.cuda import types
6-
from numba.core import ir, errors
6+
from numba.cuda.core import ir
7+
from numba.core import errors
78
from numba.cuda.core import consts
89
import operator
910
from functools import reduce
@@ -382,7 +383,7 @@ def find_literally_calls(func_ir, argtypes):
382383
argtypes : Sequence[numba.types.Type]
383384
The argument types.
384385
"""
385-
from numba.core import ir_utils
386+
from numba.cuda.core import ir_utils
386387

387388
marked_args = set()
388389
first_loc = {}

numba_cuda/numba/cuda/core/annotations/type_annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import textwrap
1212
from io import StringIO
1313

14-
from numba.core import ir
14+
from numba.cuda.core import ir
1515

1616

1717
class SourceLines(Mapping):

numba_cuda/numba/cuda/core/base.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from collections import defaultdict
55
import copy
6+
import importlib
67
import sys
78
from itertools import permutations, takewhile
89
from contextlib import contextmanager
@@ -212,10 +213,15 @@ def enable_boundscheck(self, value):
212213
def __init__(self, typing_context, target):
213214
self.address_size = utils.MACHINE_BITS
214215
self.typing_context = typing_context
215-
from numba.core.target_extension import target_registry
216-
217216
self.target_name = target
218-
self.target = target_registry[target]
217+
218+
if importlib.util.find_spec("numba"):
219+
from numba.core.target_extension import CUDA
220+
221+
# Used only in Numba's target_extension implementation.
222+
# Numba-CUDA has the target_extension implementation removed, and
223+
# references to it hardcoded to values specific to the CUDA target.
224+
self.target = CUDA
219225

220226
# A mapping of installed registries to their loaders
221227
self._registries = {}

numba_cuda/numba/cuda/core/boxing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from numba.cuda import types, cgutils
1111
from numba.cuda.core.pythonapi import box, unbox, reflect, NativeValue
12-
from numba.core.errors import NumbaNotImplementedError, TypingError
12+
from numba.cuda.core.errors import NumbaNotImplementedError, TypingError
1313
from numba.cuda.typing.typeof import typeof, Purpose
1414

1515
from numba.cuda.cpython import setobj, listobj

numba_cuda/numba/cuda/core/bytecode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
from types import CodeType, ModuleType
1010

11-
from numba.core import errors, serialize
11+
from numba.core import errors
12+
from numba.core import serialize
1213
from numba.cuda import utils
1314
from numba.cuda.utils import PYVERSION
1415

numba_cuda/numba/cuda/core/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from numba.cuda.core.tracing import event
55

66
from numba.core import errors
7-
from numba.core.errors import CompilerError
7+
from numba.cuda.core.errors import CompilerError
88

99
from numba.cuda.core import callconv, config, bytecode
1010
from numba.cuda.core.untyped_passes import ExtractByteCode, FixupArgs

0 commit comments

Comments
 (0)