Skip to content

Commit 00ec227

Browse files
committed
Revert target_extension vendoring
1 parent 528b6d0 commit 00ec227

File tree

11 files changed

+12
-200
lines changed

11 files changed

+12
-200
lines changed

numba_cuda/numba/cuda/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def compile_cuda(
742742
flags.lto = lto
743743

744744
# Run compilation pipeline
745-
from numba.cuda.core.target_extension import target_override
745+
from numba.core.target_extension import target_override
746746

747747
with target_override("cuda"):
748748
cres = compile_extra(

numba_cuda/numba/cuda/core/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def enable_boundscheck(self, value):
212212
def __init__(self, typing_context, target):
213213
self.address_size = utils.MACHINE_BITS
214214
self.typing_context = typing_context
215-
from numba.cuda.core.target_extension import target_registry
215+
from numba.core.target_extension import target_registry
216216

217217
self.target_name = target
218218
self.target = target_registry[target]

numba_cuda/numba/cuda/core/target_extension.py

Lines changed: 0 additions & 188 deletions
This file was deleted.

numba_cuda/numba/cuda/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def load_overload(self, sig, target_context):
731731
# Loading an overload refreshes the context to ensure it is
732732
# initialized. To initialize the correct (i.e. CUDA) target, we need to
733733
# enforce that the current target is the CUDA target.
734-
from numba.cuda.core.target_extension import target_override
734+
from numba.core.target_extension import target_override
735735

736736
with target_override("cuda"):
737737
return super().load_overload(sig, target_context)

numba_cuda/numba/cuda/initialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def initialize_all():
88

99
from numba.cuda.decorators import jit
1010
from numba.cuda.dispatcher import CUDADispatcher
11-
from numba.cuda.core.target_extension import (
11+
from numba.core.target_extension import (
1212
target_registry,
1313
dispatcher_registry,
1414
jit_registry,

numba_cuda/numba/cuda/lowering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ def _lower_call_normal(self, fnty, expr, signature):
12391239
)
12401240
tname = expr.target
12411241
if tname is not None:
1242-
from numba.cuda.core.target_extension import (
1242+
from numba.core.target_extension import (
12431243
resolve_dispatcher_from_str,
12441244
)
12451245

numba_cuda/numba/cuda/tests/core/test_serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import numba
1414
from numba.core.errors import TypingError
1515
from numba.cuda.tests.support import TestCase
16-
from numba.cuda.core.target_extension import resolve_dispatcher_from_str
16+
from numba.core.target_extension import resolve_dispatcher_from_str
1717
from numba.cuda.cloudpickle import dumps, loads
1818

1919

numba_cuda/numba/cuda/types/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def get_call_type(self, context, args, kws):
315315
)
316316

317317
# get the order in which to try templates
318-
from numba.cuda.core.target_extension import (
318+
from numba.core.target_extension import (
319319
get_local_target,
320320
) # circular
321321

numba_cuda/numba/cuda/typing/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def find_matching_getattr_template(self, typ, attr):
291291
templates = list(self._get_attribute_templates(typ))
292292

293293
# get the order in which to try templates
294-
from numba.cuda.core.target_extension import get_local_target
294+
from numba.core.target_extension import get_local_target
295295

296296
target_hw = get_local_target(self)
297297
order = order_by_target_specificity(target_hw, templates, fnkey=attr)
@@ -446,7 +446,7 @@ def install_registry(self, registry, external_defs_only=False):
446446
loader = templates.RegistryLoader(registry)
447447
self._registries[registry] = loader
448448

449-
from numba.cuda.core.target_extension import (
449+
from numba.core.target_extension import (
450450
get_local_target,
451451
resolve_target_str,
452452
)

numba_cuda/numba/cuda/typing/templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ def _get_impl(self, args, kws):
767767
def _get_jit_decorator(self):
768768
"""Gets a jit decorator suitable for the current target"""
769769

770-
from numba.cuda.core.target_extension import (
770+
from numba.core.target_extension import (
771771
target_registry,
772772
get_local_target,
773773
jit_registry,
@@ -976,7 +976,7 @@ def _get_target_registry(self, reason):
976976
-------
977977
reg : a registry suitable for the current target.
978978
"""
979-
from numba.cuda.core.target_extension import (
979+
from numba.core.target_extension import (
980980
_get_local_target_checked,
981981
dispatcher_registry,
982982
)

0 commit comments

Comments
 (0)