Skip to content

Commit

Permalink
Add comment to workaround
Browse files Browse the repository at this point in the history
Add comment to specify why portBLAS needs this workaround and point to
open issue in intel/llvm
  • Loading branch information
s-Nick committed Jul 22, 2024
1 parent a8aea43 commit 7f2c805
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/blas/backends/portblas/portblas_level1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ sycl::event rotmg(sycl::queue &queue, real_t *d1, real_t *d2, real_t *x1, real_t
const std::vector<sycl::event> &dependencies) {
auto y_d =
(real_t *)sycl::malloc_device(sizeof(real_t), queue.get_device(), queue.get_context());
// This memcpy requires a wait to enforce synchronization. This is due to workaround
// a bug present in OpenCL backend that shows up with portBLAS implementation.
// Otherwise event dependencies works fine.
// The issue has been reported to intel/llvm project here:
// https://github.com/intel/llvm/issues/14623
queue.memcpy(y_d, &y1, sizeof(real_t), dependencies).wait();
auto rotmg_event = std::invoke([&]() -> sycl::event {
CALL_PORTBLAS_USM_FN(::blas::_rotmg, queue, d1, d2, x1, y_d, param);
Expand Down

0 comments on commit 7f2c805

Please sign in to comment.