Skip to content

Commit b4df85c

Browse files
atmnpgmarkall
andauthored
[Refactor][NFC] Vendor-in errors for future CUDA-specific changes (#534)
This change vendors in numba.core.errors for future CUDA-specific changes. This change also incorporates some minor import cleanups to use already vendored in modules instead of upstream ones. --------- Co-authored-by: Graham Markall <[email protected]> Co-authored-by: Graham Markall <[email protected]>
1 parent 5aeb63c commit b4df85c

Some content is hidden

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

71 files changed

+1029
-94
lines changed

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: 3 additions & 3 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

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/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

numba_cuda/numba/cuda/core/consts.py

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

55
import weakref
66

7-
from numba.core.errors import ConstantInferenceError, NumbaError
8-
from numba.core import ir
7+
from numba.cuda.core.errors import ConstantInferenceError, NumbaError
8+
from numba.cuda.core import ir
99

1010

1111
class ConstantInference(object):

numba_cuda/numba/cuda/core/controlflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77

88
from numba.core.ir import Loc
9-
from numba.core.errors import UnsupportedError
9+
from numba.cuda.core.errors import UnsupportedError
1010
from numba.cuda.utils import PYVERSION
1111

1212
# List of bytecodes creating a new block in the control flow graph

0 commit comments

Comments
 (0)