Skip to content

Commit fd9286c

Browse files
committed
Cleaned up host_tasks in triu/l implementation
1 parent ac9bcd4 commit fd9286c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dpctl/tensor/libtensor/source/triul_ctor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ usm_ndarray_triul(sycl::queue exec_q,
250250
dev_shape_and_strides, k, depends, {copy_shape_and_strides});
251251
}
252252

253-
exec_q.submit([&](sycl::handler &cgh) {
253+
auto temporaries_cleanup_ev = exec_q.submit([&](sycl::handler &cgh) {
254254
cgh.depends_on({tri_ev});
255255
auto ctx = exec_q.get_context();
256256
cgh.host_task(
@@ -261,8 +261,9 @@ usm_ndarray_triul(sycl::queue exec_q,
261261
});
262262
});
263263

264-
return std::make_pair(keep_args_alive(exec_q, {src, dst}, {tri_ev}),
265-
tri_ev);
264+
return std::make_pair(
265+
keep_args_alive(exec_q, {src, dst}, {temporaries_cleanup_ev}),
266+
temporaries_cleanup_ev);
266267
}
267268

268269
void init_triul_ctor_dispatch_vectors(void)

0 commit comments

Comments
 (0)