Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 7d26980

Browse files
authored
Patch to fix SDC integration testing (#203)
1 parent 6a8b6fb commit 7d26980

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

numba/core/typing/context.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ def _resolve_user_function_type(self, func, args, kws, literals=None):
234234
if functy is not None:
235235
func = functy
236236

237+
from numba.core.registry import CPUDispatcher
238+
if isinstance(func, CPUDispatcher) and func is not CPUDispatcher:
239+
# if we are here it's numba-dppy case and we got TargetDispatcher, so get compiled version
240+
func = func.get_compiled()
241+
functy = self._lookup_global(func)
242+
if functy is not None:
243+
func = functy
244+
237245
if isinstance(func, types.Type):
238246
# If it's a type, it may support a __call__ method
239247
func_type = self.resolve_getattr(func, "__call__")

0 commit comments

Comments
 (0)