Bugfix/gh 1874 result type by oleksandr-pavlyk · Pull Request #1877 · IntelPython/dpctl · GitHub
Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
3 changes: 3 additions & 0 deletions dpctl/tensor/_type_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ def result_type(*arrays_and_dtypes):
target_dev = d
inspected = True

if not dtypes and weak_dtypes:
dtypes.append(weak_dtypes[0].get())

if not (has_fp16 and has_fp64):
for dt in dtypes:
if not _dtype_supported_by_device_impl(dt, has_fp16, has_fp64):
Expand Down
25 changes: 25 additions & 0 deletions dpctl/tests/test_usm_ndarray_manipulation.py