From 51ed43bb5cb08f38b0b652255a13bb4072b2ee57 Mon Sep 17 00:00:00 2001 From: Denis Samoilov Date: Wed, 26 Jul 2023 19:28:39 -0700 Subject: [PATCH] gpu: sycl: use get_multi_ptr instead of deprecated get_pointer --- src/gpu/sycl/sycl_types.hpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/gpu/sycl/sycl_types.hpp b/src/gpu/sycl/sycl_types.hpp index d211c4fbb5d..6bd3a065fbd 100644 --- a/src/gpu/sycl/sycl_types.hpp +++ b/src/gpu/sycl/sycl_types.hpp @@ -67,16 +67,9 @@ struct sycl_memory_arg_t { // This method must be called only from inside a kernel. void *get_pointer() const { if (usm_) return usm_; - - // The compiler has changed `get_pointer()` API therefore we have to - // handle both old and new versions of the API to avoid breaking user's - // applications that use older compiler versions. - if constexpr (std::is_same_v>) { - return const_cast(acc_.get_pointer()); - } else { - return acc_.get_pointer().get(); - } + return const_cast( + acc_.template get_multi_ptr<::sycl::access::decorated::no>() + .get()); } bool empty() const { return empty_; }