Closed
Description
DPPY device functions can not be called from @numba.jit
functions.
Example:
Example:
@dppy.func
def a_device_function(a):
return a + 1
@numba.jit(nopython=True)
def a_numba_function(x):
return a_device_function(x)
def test_device_function():
context = get_context()
with dpctl.device_context(context):
C = a_numba_function(10)
print(C)
Output:
numba.core.errors.TypingError: Failed in dppy_nopython mode pipeline (step: nopython frontend)
Untyped global name 'a_device_function': cannot determine Numba type of <class 'numba_dppy.compiler.DPPYFunctionTemplate'>
File "numba_dppy/examples/dppy_func.py", line 13:
def a_numba_function(x):
return a_device_function(x)
^
Metadata
Metadata
Assignees
Labels
No labels