Skip to content

Commit 2d25b36

Browse files
committed
Also register _compatible_view with generic target
1 parent d72df43 commit 2d25b36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

numba_cuda/numba/cuda/core/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
from numba.core import (
1515
types,
1616
datamodel,
17-
config,
1817
imputils,
1918
)
20-
from numba.cuda import cgutils, debuginfo, utils
19+
from numba.cuda import cgutils, debuginfo, utils, config
2120
from numba.core import errors
2221
from numba.cuda.core import targetconfig, funcdesc
2322
from numba.core.compiler_lock import global_compiler_lock
@@ -823,14 +822,15 @@ def _compile_subroutine_no_cache(
823822
Note this context's flags are not inherited.
824823
"""
825824
# Compile
826-
from numba.core import compiler
825+
from numba.cuda import compiler
826+
from numba.cuda.flags import Flags
827827

828828
with global_compiler_lock:
829829
codegen = self.codegen()
830830
library = codegen.create_library(impl.__name__)
831831
if flags is None:
832832
cstk = targetconfig.ConfigStack()
833-
flags = compiler.Flags()
833+
flags = Flags()
834834
if cstk:
835835
tls_flags = cstk.top()
836836
if tls_flags.is_set("nrt") and tls_flags.nrt:

numba_cuda/numba/cuda/np/arrayobj.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,6 +3018,7 @@ def _compatible_view(a, dtype):
30183018

30193019

30203020
@overload(_compatible_view)
3021+
@overload(_compatible_view, target="generic")
30213022
def ol_compatible_view(a, dtype):
30223023
"""Determines if the array and dtype are compatible for forming a view."""
30233024

0 commit comments

Comments
 (0)