From e0aea2896533fba5af7b66d46270622f370a989b Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 25 Aug 2023 04:51:57 -0500 Subject: [PATCH] Resolved SYCL-2020 deprecation warning ``` In file included from ~/dpctl/dpctl/tensor/libtensor/source/elementwise_functions.cpp:56: ~/dpctl/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp:118:42: warning: 'sincos' is deprecated: SYCL builtin functions with raw pointer arguments have been deprecated. Please use multi_ptr. [-Wdeprecated-declarations] 118 | const realT sinY_val = sycl::sincos(y, &cosY_val); ``` The resolution is to convert raw pointer to multi-pointer using `sycl::address_space_cast`. --- .../include/kernels/elementwise_functions/expm1.hpp | 5 ++++- 1 file changed, 4 insertions(+), 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 b996a6d0ec..3e69aa5464 100644 --- a/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp +++ b/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp @@ -115,7 +115,10 @@ template struct Expm1Functor // x, y finite numbers realT cosY_val; - const realT sinY_val = sycl::sincos(y, &cosY_val); + auto cosY_val_multi_ptr = sycl::address_space_cast< + sycl::access::address_space::global_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); const realT res_re =