From 03e7f264f403b94479f10a9d50bd7826580cca3d Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 6 Sep 2023 00:52:21 -0500 Subject: [PATCH] address_space_cast on local variable To create the multi_ptr from a local variable (in private memory) we should be using address_space::private_space. --- .../libtensor/include/kernels/elementwise_functions/expm1.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp b/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp index 3e69aa5464..e1c23113c6 100644 --- a/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp +++ b/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp @@ -116,7 +116,7 @@ template struct Expm1Functor // x, y finite numbers realT cosY_val; auto cosY_val_multi_ptr = sycl::address_space_cast< - sycl::access::address_space::global_space, + sycl::access::address_space::private_space, sycl::access::decorated::yes>(&cosY_val); const realT sinY_val = sycl::sincos(y, cosY_val_multi_ptr); const realT sinhalfY_val = std::sin(y / 2);