From 16ec06a7e11b67cfa044b9da19c1afbc782b4e4e Mon Sep 17 00:00:00 2001 From: Udit Agarwal Date: Tue, 9 Jul 2024 07:35:39 -0700 Subject: [PATCH] [NFC][SYCL] Workaround for seg-fault in `vec::convert<>` for OpenCL CPU at O0 --- sycl/include/sycl/vector_preview.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/include/sycl/vector_preview.hpp b/sycl/include/sycl/vector_preview.hpp index d0549dbefd817..e374e0309445c 100644 --- a/sycl/include/sycl/vector_preview.hpp +++ b/sycl/include/sycl/vector_preview.hpp @@ -489,9 +489,9 @@ class vec : public detail::vec_arith { !std::is_same_v; if constexpr (canUseNativeVectorConvert) { - Result.m_Data = sycl::bit_cast( - detail::convertImpl(NativeVector)); + auto val = detail::convertImpl(NativeVector); + Result.m_Data = sycl::bit_cast(val); } else #endif // __SYCL_DEVICE_ONLY__ {