Skip to content

[SYCL] Do not use handler::addAccessorReq() #16111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(AccessTarget), ArgIndex);
Expand Down Expand Up @@ -2580,9 +2579,6 @@ class __SYCL_EXPORT handler {

MSrcPtr = static_cast<void *>(AccImpl.get());
MDstPtr = static_cast<void *>(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
Expand Down Expand Up @@ -2618,9 +2614,6 @@ class __SYCL_EXPORT handler {

MSrcPtr = const_cast<T_Src *>(Src);
MDstPtr = static_cast<void *>(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
Expand Down Expand Up @@ -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
Expand All @@ -2704,7 +2693,6 @@ class __SYCL_EXPORT handler {
detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase);

MDstPtr = static_cast<void *>(AccImpl.get());
addAccessorReq(std::move(AccImpl));
}

public:
Expand Down Expand Up @@ -3459,7 +3447,6 @@ class __SYCL_EXPORT handler {
detail::AccessorImplPtr AccImpl = detail::getSyclObjImpl(*AccBase);

MDstPtr = static_cast<void *>(AccImpl.get());
addAccessorReq(std::move(AccImpl));

MPattern.resize(sizeof(T));
auto PatternPtr = reinterpret_cast<T *>(MPattern.data());
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ class reduction_impl_algo {
}
});
} else {
accessor OutAcc{Out, CGH};
accessor OutAcc{Out, CopyHandler};
CopyHandler.copy(Mem, OutAcc);
}
});
Expand Down
4 changes: 4 additions & 0 deletions sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,12 +2055,16 @@ void handler::SetHostTask(std::function<void(interop_handle)> &&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<const void> SPtr) {
impl->CGData.MSharedPtrStorage.push_back(std::move(SPtr));
Expand Down
Loading