From a134cb4132b43e9f970bd2945a80e5f321949ba3 Mon Sep 17 00:00:00 2001 From: Ouadie EL FAROUKI Date: Fri, 13 Oct 2023 15:59:14 +0100 Subject: [PATCH] fixed async dot operation bug in rot tests causing failure --- test/unittest/blas1/blas1_rot_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unittest/blas1/blas1_rot_test.cpp b/test/unittest/blas1/blas1_rot_test.cpp index 1a54672e4..1a991a3f5 100644 --- a/test/unittest/blas1/blas1_rot_test.cpp +++ b/test/unittest/blas1/blas1_rot_test.cpp @@ -61,6 +61,7 @@ void run_test(const combination_t combi) { s_d); auto out_cpu_s = reference_blas::dot(size, a_cpu_v.data(), incX, b_cpu_v.data(), incY); + scalar_t init_out_gpu = 0; // SYCL implementation auto q = make_queue(); @@ -77,8 +78,10 @@ void run_test(const combination_t combi) { auto c = static_cast(c_d); auto s = static_cast(s_d); + auto init_copy = helper::copy_to_device(q, &init_out_gpu, gpu_out_s, 1); auto rot_event = _rot(sb_handle, size, gpu_a_v, incX, gpu_b_v, incY, c, s, {copy_a, copy_b}); + sb_handle.wait(init_copy); auto dot_event = _dot(sb_handle, size, gpu_a_v, incX, gpu_b_v, incY, gpu_out_s, {rot_event}); sb_handle.wait(dot_event);