diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 8abb4323ab3e1..e0a5caab1cbde 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -618,7 +618,6 @@ class __SYCL_EXPORT handler { detail::AccessorBaseHost *AccBase = (detail::AccessorBaseHost *)&Arg; detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase); detail::AccessorImplHost *Req = AccImpl.get(); - addAccessorReq(std::move(AccImpl)); // Add accessor to the list of arguments. addArg(detail::kernel_param_kind_t::kind_accessor, Req, static_cast(AccessTarget), ArgIndex); @@ -2580,9 +2579,6 @@ class __SYCL_EXPORT handler { MSrcPtr = static_cast(AccImpl.get()); MDstPtr = static_cast(Dst); - // Store copy of accessor to the local storage to make sure it is alive - // until we finish - addAccessorReq(std::move(AccImpl)); } /// Copies the content of memory pointed by Src into the memory object @@ -2618,9 +2614,6 @@ class __SYCL_EXPORT handler { MSrcPtr = const_cast(Src); MDstPtr = static_cast(AccImpl.get()); - // Store copy of accessor to the local storage to make sure it is alive - // until we finish - addAccessorReq(std::move(AccImpl)); } /// Copies the content of memory object accessed by Src to the memory @@ -2675,10 +2668,6 @@ class __SYCL_EXPORT handler { MSrcPtr = AccImplSrc.get(); MDstPtr = AccImplDst.get(); - // Store copy of accessor to the local storage to make sure it is alive - // until we finish - addAccessorReq(std::move(AccImplSrc)); - addAccessorReq(std::move(AccImplDst)); } /// Provides guarantees that the memory object accessed via Acc is updated @@ -2704,7 +2693,6 @@ class __SYCL_EXPORT handler { detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase); MDstPtr = static_cast(AccImpl.get()); - addAccessorReq(std::move(AccImpl)); } public: @@ -3459,7 +3447,6 @@ class __SYCL_EXPORT handler { detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase); MDstPtr = static_cast(AccImpl.get()); - addAccessorReq(std::move(AccImpl)); MPattern.resize(sizeof(T)); auto PatternPtr = reinterpret_cast(MPattern.data()); diff --git a/sycl/include/sycl/reduction.hpp b/sycl/include/sycl/reduction.hpp index f84940d81d162..576dac72a3ce2 100644 --- a/sycl/include/sycl/reduction.hpp +++ b/sycl/include/sycl/reduction.hpp @@ -1014,7 +1014,7 @@ class reduction_impl_algo { } }); } else { - accessor OutAcc{Out, CGH}; + accessor OutAcc{Out, CopyHandler}; CopyHandler.copy(Mem, OutAcc); } }); diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 61ea7ee7be0a0..8bd4d77ba1332 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -2055,12 +2055,16 @@ void handler::SetHostTask(std::function &&Func) { setType(detail::CGType::CodeplayHostTask); } +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES +// TODO: This function is not used anymore, remove it in the next +// ABI-breaking window. void handler::addAccessorReq(detail::AccessorImplPtr Accessor) { // Add accessor to the list of requirements. impl->CGData.MRequirements.push_back(Accessor.get()); // Store copy of the accessor. impl->CGData.MAccStorage.push_back(std::move(Accessor)); } +#endif void handler::addLifetimeSharedPtrStorage(std::shared_ptr SPtr) { impl->CGData.MSharedPtrStorage.push_back(std::move(SPtr));