Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit f5887ca

Browse files
fixed async dot operation bug in rot tests causing failure
1 parent a6dcd81 commit f5887ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/unittest/blas1/blas1_rot_test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void run_test(const combination_t<scalar_t> combi) {
6161
s_d);
6262
auto out_cpu_s =
6363
reference_blas::dot(size, a_cpu_v.data(), incX, b_cpu_v.data(), incY);
64+
scalar_t init_out_gpu = 0;
6465

6566
// SYCL implementation
6667
auto q = make_queue();
@@ -77,8 +78,10 @@ void run_test(const combination_t<scalar_t> combi) {
7778
auto c = static_cast<scalar_t>(c_d);
7879
auto s = static_cast<scalar_t>(s_d);
7980

81+
auto init_copy = helper::copy_to_device(q, &init_out_gpu, gpu_out_s, 1);
8082
auto rot_event = _rot(sb_handle, size, gpu_a_v, incX, gpu_b_v, incY, c, s,
8183
{copy_a, copy_b});
84+
sb_handle.wait(init_copy);
8285
auto dot_event = _dot(sb_handle, size, gpu_a_v, incX, gpu_b_v, incY,
8386
gpu_out_s, {rot_event});
8487
sb_handle.wait(dot_event);

0 commit comments

Comments
 (0)