From 3c22764fe6181ae99db703f48e919bbe744fb9bd Mon Sep 17 00:00:00 2001 From: smaslov-intel Date: Wed, 19 Oct 2022 11:03:54 -0700 Subject: [PATCH] [SYCL] Invert the KeepOwnership argument to match PI API definitions (#7089) The existing test https://github.com/intel/llvm-test-suite/blob/intel/SYCL/OnlineCompiler/online_compiler_L0.cpp caught this problem when run with ZE_DEBUG=4 Signed-off-by: Sergey V Maslov --- sycl/source/backend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/source/backend.cpp b/sycl/source/backend.cpp index fcfd2703f22ad..8e9d9e94a3223 100644 --- a/sycl/source/backend.cpp +++ b/sycl/source/backend.cpp @@ -140,7 +140,7 @@ make_kernel_bundle(pi_native_handle NativeHandle, const context &TargetContext, pi::PiProgram PiProgram = nullptr; Plugin.call( - NativeHandle, ContextImpl->getHandleRef(), KeepOwnership, &PiProgram); + NativeHandle, ContextImpl->getHandleRef(), !KeepOwnership, &PiProgram); std::vector ProgramDevices; size_t NumDevices = 0; @@ -251,7 +251,7 @@ kernel make_kernel(const context &TargetContext, // Create PI kernel first. pi::PiKernel PiKernel = nullptr; Plugin.call( - NativeHandle, ContextImpl->getHandleRef(), PiProgram, KeepOwnership, + NativeHandle, ContextImpl->getHandleRef(), PiProgram, !KeepOwnership, &PiKernel); if (Backend == backend::opencl)