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

Commit

Permalink
fixed async dot operation bug in rot tests causing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
OuadiElfarouki committed Oct 13, 2023
1 parent a6dcd81 commit f5887ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unittest/blas1/blas1_rot_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void run_test(const combination_t<scalar_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();
Expand All @@ -77,8 +78,10 @@ void run_test(const combination_t<scalar_t> combi) {
auto c = static_cast<scalar_t>(c_d);
auto s = static_cast<scalar_t>(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);
Expand Down

0 comments on commit f5887ca

Please sign in to comment.