From 57c2913396ff73aec30231941b908ae1cc206126 Mon Sep 17 00:00:00 2001 From: Alejandro Acosta Date: Tue, 1 Aug 2023 16:00:38 +0100 Subject: [PATCH] Fix sync call --- src/interface/blas1_interface.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interface/blas1_interface.hpp b/src/interface/blas1_interface.hpp index 94b8371e8..d4393159e 100644 --- a/src/interface/blas1_interface.hpp +++ b/src/interface/blas1_interface.hpp @@ -781,7 +781,8 @@ typename ValueType::type _asum( auto gpu_res = blas::helper::allocate < is_usm ? helper::AllocType::usm : helper::AllocType::buffer, element_t > (static_cast(1), sb_handle.get_queue()); - blas::internal::_asum(sb_handle, _N, _vx, _incx, gpu_res, _dependencies); + auto asum_event = blas::internal::_asum(sb_handle, _N, _vx, _incx, gpu_res, _dependencies); + sb_handle.wait(asum_event); auto event = blas::helper::copy_to_host(sb_handle.get_queue(), gpu_res, res.data(), 1); sb_handle.wait(event);