Skip to content

Commit 70e7e88

Browse files
Add synchronization points for triaging:
1 parent d4f5aa4 commit 70e7e88

File tree

1 file changed

+6
-0
lines changed
  • dpctl/tensor/libtensor/include/kernels/sorting

1 file changed

+6
-0
lines changed

dpctl/tensor/libtensor/include/kernels/sorting/topk.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,15 @@ sycl::event topk_radix_impl(sycl::queue &exec_q,
517517
});
518518
#endif
519519

520+
iota_ev.wait();
521+
520522
sycl::event radix_sort_ev =
521523
radix_sort_details::parallel_radix_sort_impl<IndexTy, IndexedProjT>(
522524
exec_q, iter_nelems, axis_nelems, workspace, tmp_tp, proj_op,
523525
ascending, {iota_ev});
524526

527+
radix_sort_ev.wait();
528+
525529
// Write out top k of the temporary
526530
sycl::event write_topk_ev = exec_q.submit([&](sycl::handler &cgh) {
527531
cgh.depends_on(radix_sort_ev);
@@ -543,6 +547,8 @@ sycl::event topk_radix_impl(sycl::queue &exec_q,
543547
});
544548
});
545549

550+
write_topk_ev.wait();
551+
546552
sycl::event cleanup_ev = exec_q.submit([&](sycl::handler &cgh) {
547553
cgh.depends_on(write_topk_ev);
548554

0 commit comments

Comments
 (0)