Skip to content

[SYCL] Level-Zero support of piextKernelSetArgSampler #2076

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
merged 2 commits into from
Jul 10, 2020
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
8 changes: 6 additions & 2 deletions sycl/plugins/level_zero/pi_level0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2028,8 +2028,12 @@ pi_result piextKernelSetArgMemObj(pi_kernel Kernel, pi_uint32 ArgIndex,
// Special version of piKernelSetArg to accept pi_sampler.
pi_result piextKernelSetArgSampler(pi_kernel Kernel, pi_uint32 ArgIndex,
const pi_sampler *ArgValue) {
die("piextKernelSetArgSampler: not implemented");
return {};
assert(Kernel);
ZE_CALL(zeKernelSetArgumentValue(
pi_cast<ze_kernel_handle_t>(Kernel->ZeKernel),
pi_cast<uint32_t>(ArgIndex), sizeof(void *), &(*ArgValue)->ZeSampler));

return PI_SUCCESS;
}

pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName,
Expand Down
3 changes: 0 additions & 3 deletions sycl/plugins/level_zero/pi_level0.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ struct _pi_sampler : _pi_object {
_pi_sampler(ze_sampler_handle_t Sampler) : ZeSampler{Sampler} {}

// L0 sampler handle.
// TODO: It is important that L0 handler is the first data member. Workaround
// in SYCL RT (in ExecCGCommand::enqueueImp()) relies on this. This comment
// should be removed when workaround in SYCL runtime will be removed.
ze_sampler_handle_t ZeSampler;
};

Expand Down
1 change: 0 additions & 1 deletion sycl/test/basic_tests/image_accessor_readsampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
//
// XFAIL: level0
//==------------------- image_accessor_readsampler.cpp ---------------------==//
//==-----------------image_accessor read API test with sampler--------------==//
//
Expand Down