Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Fixes regression in tensor.nonzero introduced in gh-1300
Closes gh-1322

The indexes arrays must be allocated in default integral data type
for the target device.
  • Loading branch information
oleksandr-pavlyk committed Aug 2, 2023
commit 8ded9c392e0a5adcc5a782792102a50bc73521f3
3 changes: 2 additions & 1 deletion dpctl/tensor/_copy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@ def _nonzero_impl(ary):
mask_nelems, dtype=cumsum_dt, sycl_queue=exec_q, order="C"
)
mask_count = ti.mask_positions(ary, cumsum, sycl_queue=exec_q)
indexes_dt = ti.default_device_int_type(exec_q.sycl_device)
indexes = dpt.empty(
(ary.ndim, mask_count),
dtype=cumsum.dtype,
dtype=indexes_dt,
usm_type=usm_type,
sycl_queue=exec_q,
order="C",
Expand Down