Skip to content

Commit 22481d0

Browse files
Do not use shorthand queue::copy
1 parent f1ae68f commit 22481d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dpctl/tensor/libtensor/include/kernels/accumulators.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,10 @@ size_t accumulate_strided_impl(sycl::queue &q,
339339
if (last_elem_host_usm == nullptr) {
340340
throw std::bad_alloc();
341341
}
342-
sycl::event copy_e =
343-
q.copy<cumsumT>(last_elem, last_elem_host_usm, 1, {comp_ev});
342+
sycl::event copy_e = q.submit([&](sycl::handler &cgh) {
343+
cgh.depends_on(comp_ev);
344+
cgh.copy<cumsumT>(last_elem, last_elem_host_usm, 1);
345+
});
344346
copy_e.wait();
345347
size_t return_val = static_cast<size_t>(*last_elem_host_usm);
346348
sycl::free(last_elem_host_usm, q);

0 commit comments

Comments
 (0)