Skip to content

Commit b083e05

Browse files
[SYCL][L0] Avoid PI kernel leak for SYCL-L0 interop kernel (#6980)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent b1619f7 commit b083e05

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sycl/source/detail/kernel_impl.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ kernel_impl::kernel_impl(RT::PiKernel Kernel, ContextImplPtr Context,
2222
: kernel_impl(Kernel, Context,
2323
std::make_shared<program_impl>(Context, Kernel),
2424
/*IsCreatedFromSource*/ true, KernelBundleImpl) {
25-
// This constructor is only called in the interoperability kernel constructor.
26-
// Let the runtime caller handle native kernel retaining in other cases if
27-
// it's needed.
28-
getPlugin().call<PiApiKind::piKernelRetain>(MKernel);
2925
// Enable USM indirect access for interoperability kernels.
3026
// Some PI Plugins (like OpenCL) require this call to enable USM
3127
// For others, PI will turn this into a NOP.
3228
getPlugin().call<PiApiKind::piKernelSetExecInfo>(
3329
MKernel, PI_USM_INDIRECT_ACCESS, sizeof(pi_bool), &PI_TRUE);
3430

31+
// This constructor is only called in the interoperability kernel constructor.
3532
MIsInterop = true;
3633
}
3734

0 commit comments

Comments
 (0)