Skip to content

[SYCL] Fix kernel_compiler leak. #12120

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 1 commit into from
Dec 8, 2023

Conversation

cperkinsintel
Copy link
Contributor

CreateProgram and CreateKernel APIs implicitly retain program and kernels. Extra call to retain is incorrect.

@@ -369,8 +369,7 @@ class kernel_bundle_impl {
const PluginPtr &Plugin = ContextImpl->getPlugin();
Plugin->call<PiApiKind::piProgramCreate>(
ContextImpl->getHandleRef(), spirv.data(), spirv.size(), &PiProgram);

Plugin->call<PiApiKind::piProgramRetain>(PiProgram);
// program created by piProgramCreate is implicitly retained.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
// program created by piProgramCreate is implicitly retained.
// Program created by piProgramCreate is implicitly retained.

@againull againull merged commit 74bf30a into intel:sycl Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants