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

Extending typeof() #101

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions numba/core/typing/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,17 +352,8 @@ def resolve_argument_type(self, val):
try:
return typeof(val, Purpose.argument)
except ValueError:
from numba.dppl_config import dppl_present, DeviceArray
if dppl_present:
if(type(val) == DeviceArray):
return typeof(val._ndarray, Purpose.argument)
# DRD : Hmmm... is the assumption that this error is encountered
# when someone is using cuda, and already has done an import
# cuda?
#elif numba.cuda.is_cuda_array(val):
# return typeof(numba.cuda.as_cuda_array(val), Purpose.argument)
else:
raise
if numba.cuda.is_cuda_array(val):
return typeof(numba.cuda.as_cuda_array(val), Purpose.argument)
else:
raise

Expand Down