Skip to content

Commit

Permalink
Fix benchmarks to wait on correct event (#477)
Browse files Browse the repository at this point in the history
Wait on the relevant event or vector of events for the operator 
rather than waiting for all the events in the queue.
  • Loading branch information
pgorlani authored Nov 14, 2023
1 parent dd1c388 commit 7c600d3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmark/portblas/blas2/ger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void run(benchmark::State& state, blas::SB_Handle* sb_handle_ptr, index_t m,
auto blas_method_def = [&]() -> std::vector<cl::sycl::event> {
auto event = _ger(sb_handle, m, n, alpha, v_x_gpu, incX, v_y_gpu, incY,
m_a_gpu, lda);
sb_handle.wait();
sb_handle.wait(event);
return event;
};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/portblas/blas2/symv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void run(benchmark::State& state, blas::SB_Handle* sb_handle_ptr,
auto blas_method_def = [&]() -> std::vector<cl::sycl::event> {
auto event = _symv(sb_handle, *uplo_str, n, alpha, m_a_gpu, lda, v_x_gpu,
incX, beta, v_y_gpu, incY);
sb_handle.wait();
sb_handle.wait(event);
return event;
};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/portblas/blas2/syr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void run(benchmark::State& state, blas::SB_Handle* sb_handle_ptr,
auto blas_method_def = [&]() -> std::vector<cl::sycl::event> {
auto event =
_syr(sb_handle, *uplo_str, n, alpha, v_x_gpu, incX, m_a_gpu, lda);
sb_handle.wait();
sb_handle.wait(event);
return event;
};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/portblas/blas2/syr2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void run(benchmark::State& state, blas::SB_Handle* sb_handle_ptr,
auto blas_method_def = [&]() -> std::vector<cl::sycl::event> {
auto event = _syr2(sb_handle, *uplo_str, n, alpha, v_x_gpu, incX, v_y_gpu,
incY, m_a_gpu, lda);
sb_handle.wait();
sb_handle.wait(event);
return event;
};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/portblas/blas2/trmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void run(benchmark::State& state, blas::SB_Handle* sb_handle_ptr,
auto blas_method_def = [&]() -> std::vector<cl::sycl::event> {
auto event = _trmv(sb_handle, *uplo_str, *t_str, *diag_str, n, m_a_gpu, lda,
v_x_gpu, incX);
sb_handle.wait();
sb_handle.wait(event);
return event;
};

Expand Down

0 comments on commit 7c600d3

Please sign in to comment.