Skip to content
Merged
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
8 changes: 5 additions & 3 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1884,9 +1884,11 @@ static pi_result SetKernelParamsAndLaunch(
break;
case kernel_param_kind_t::kind_accessor: {
Requirement *Req = (Requirement *)(Arg.MPtr);
assert(getMemAllocationFunc != nullptr &&
"The function should not be nullptr as we followed the path for "
"which accessors are used");
if (getMemAllocationFunc == nullptr)
throw sycl::exception(make_error_code(errc::kernel_argument),
"placeholder accessor must be bound by calling "
"handler::require() before it can be used.");

RT::PiMem MemArg = (RT::PiMem)getMemAllocationFunc(Req);
if (Plugin.getBackend() == backend::opencl) {
Plugin.call<PiApiKind::piKernelSetArg>(Kernel, NextTrueIndex,
Expand Down