Skip to content

Commit 06a7970

Browse files
committed
Fix typos in set functions
Set functions were making copies and then sorting the original data, resulting in incorrect results.
1 parent 30848ee commit 06a7970

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpctl/tensor/_set_functions_async.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def unique_values(x: dpt.usm_ndarray) -> dpt.usm_ndarray:
9494
)
9595
host_tasks.append(ht_ev)
9696
ht_ev, sort_ev = _sort_ascending(
97-
src=fx,
97+
src=tmp,
9898
trailing_dims_to_sort=1,
9999
dst=s,
100100
sycl_queue=exec_q,
@@ -181,7 +181,7 @@ def unique_counts(x: dpt.usm_ndarray) -> UniqueCountsResult:
181181
)
182182
host_tasks.append(ht_ev)
183183
ht_ev, sort_ev = _sort_ascending(
184-
src=fx,
184+
src=tmp,
185185
dst=s,
186186
trailing_dims_to_sort=1,
187187
sycl_queue=exec_q,
@@ -301,7 +301,7 @@ def unique_inverse(x):
301301
)
302302
host_tasks.append(ht_ev)
303303
ht_ev, sort_ev = _argsort_ascending(
304-
src=fx,
304+
src=tmp,
305305
trailing_dims_to_sort=1,
306306
dst=sorting_ids,
307307
sycl_queue=exec_q,
@@ -462,7 +462,7 @@ def unique_all(x: dpt.usm_ndarray) -> UniqueAllResult:
462462
)
463463
host_tasks.append(ht_ev)
464464
ht_ev, sort_ev = _argsort_ascending(
465-
src=fx,
465+
src=tmp,
466466
trailing_dims_to_sort=1,
467467
dst=sorting_ids,
468468
sycl_queue=exec_q,

0 commit comments

Comments
 (0)