-
Notifications
You must be signed in to change notification settings - Fork 730
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
[SYCL][L0] Avoid PI kernel leak for SYCL-L0 interop kernel #6980
Conversation
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
// This constructor is only called in the interoperability kernel constructor. | ||
// Let the runtime caller handle native kernel retaining in other cases if | ||
// it's needed. | ||
getPlugin().call<PiApiKind::piKernelRetain>(MKernel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proper retain (for OpenCL only) is done in the "make_kernel" that calls this constructor:
Line 258 in 1c3d598
Plugin.call<PiApiKind::piKernelRetain>(PiKernel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add a test to sycl/unittests/
There is already an E2E test in llvm-test-suite/SYCL/OnlineCompiler/online_compiler_L0.cpp, which found the problem. |
Note, the ESIMD test failure cannot be related to this PR:
|
Could you please clarify if the test fails without the patch? If not, probably we need to improve it/write a better one. |
Yes, the test fails without this patch when run in valgrind. |
intel#6980 caused some unexpected regressions on OpenCL for SYCL 1.2.1 kernel interop constructors. This commit reintroduces the call to retaining the OpenCL kernel only for the old constructor. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
#6980 caused some unexpected regressions on OpenCL for SYCL 1.2.1 kernel interop constructors. This commit reintroduces the call to retaining the OpenCL kernel only for the old constructor. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Sergey V Maslov sergey.v.maslov@intel.com