Skip to content

Commit feb4528

Browse files
committed
Merge remote-tracking branch 'NVIDIA/main' into fix-target-registration
2 parents 61fab44 + eeac024 commit feb4528

File tree

141 files changed

+4612
-2722
lines changed

Some content is hidden

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

141 files changed

+4612
-2722
lines changed

numba_cuda/numba/cuda/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
import warnings
88
import sys
99

10+
1011
# Re-export types itself
1112
import numba.cuda.types as types
1213

1314
# Re-export all type names
1415
from numba.cuda.types import *
1516

17+
HAS_NUMBA = importlib.util.find_spec("numba") is not None
1618

1719
# Require NVIDIA CUDA bindings at import time
1820
if not (

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 & 4 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
@@ -446,7 +446,7 @@ def run_pass(self, state):
446446
@register_pass(mutates_CFG=True, analysis_only=False)
447447
class CUDANativeLowering(BaseNativeLowering):
448448
"""Lowering pass for a CUDA native function IR described solely in terms of
449-
Numba's standard `numba.core.ir` nodes."""
449+
Numba's standard `numba.cuda.core.ir` nodes."""
450450

451451
_name = "cuda_native_lowering"
452452

numba_cuda/numba/cuda/core/analysis.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
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.cuda.core import errors
78
from numba.cuda.core import consts
89
import operator
910
from functools import reduce
1011

1112
from .controlflow import CFGraph
12-
from numba.misc import special
13+
from numba.cuda.misc import special
1314

1415
#
1516
# Analysis related to variable lifetime
@@ -353,7 +354,7 @@ def rewrite_tuple_len(val, func_ir, called_args):
353354
if isinstance(argty, types.BaseTuple):
354355
rewrite_statement(func_ir, stmt, argty.count)
355356

356-
from numba.core.ir_utils import get_definition, guard
357+
from numba.cuda.core.ir_utils import get_definition, guard
357358

358359
for blk in func_ir.blocks.values():
359360
for stmt in blk.body:
@@ -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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from numba.cuda.core import imputils, targetconfig, funcdesc
1616
from numba.cuda import cgutils, debuginfo, types, utils, datamodel, config
17-
from numba.core import errors
17+
from numba.cuda.core import errors
1818
from numba.core.compiler_lock import global_compiler_lock
1919
from numba.cuda.core.pythonapi import PythonAPI
2020
from numba.cuda.core.imputils import (

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.cuda.core import errors
12+
from numba.cuda import serialize
1213
from numba.cuda import utils
1314
from numba.cuda.utils import PYVERSION
1415

numba_cuda/numba/cuda/core/byteflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
_lazy_pformat,
1818
)
1919
from numba.cuda.core.controlflow import NEW_BLOCKERS, CFGraph
20-
from numba.core.ir import Loc
20+
from numba.cuda.core.ir import Loc
2121
from numba.cuda.errors import UnsupportedBytecodeError
2222

2323

numba_cuda/numba/cuda/core/compiler.py

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

44
from numba.cuda.core.tracing import event
55

6-
from numba.core import errors
7-
from numba.core.errors import CompilerError
6+
from numba.cuda.core import errors
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)