Skip to content

[SYCL] Guard access to sampler and kernel objects with a mutex #5232

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 6 commits into from
May 20, 2022

Conversation

againull
Copy link
Contributor

No description provided.

@againull againull marked this pull request as ready for review January 4, 2022 22:14
@againull againull requested a review from a team as a code owner January 4, 2022 22:14
@againull
Copy link
Contributor Author

@smaslov-intel Could you please take a look.

return PI_SUCCESS;
}

pi_result piKernelRelease(pi_kernel Kernel) {

PI_ASSERT(Kernel, PI_INVALID_KERNEL);
auto KernelProgram = Kernel->Program;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this under the lock below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under the lock, thx.

Copy link
Contributor Author

@againull againull left a comment

Choose a reason for hiding this comment

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

Sorry for delayed update. I was able to address your comment after #6168 got landed.

return PI_SUCCESS;
}

pi_result piKernelRelease(pi_kernel Kernel) {

PI_ASSERT(Kernel, PI_INVALID_KERNEL);
auto KernelProgram = Kernel->Program;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved under the lock, thx.

@againull againull requested a review from smaslov-intel May 18, 2022 20:59
@againull againull requested a review from smaslov-intel May 19, 2022 22:39
@againull againull merged commit a37c10b into intel:sycl May 20, 2022
yinyangsx pushed a commit to yinyangsx/llvm that referenced this pull request May 25, 2022
…ntel#5232)

Protect access to all the non-const member variables of the sampler
and kernel classes with a mutex to improve thread-safety.
@againull againull deleted the kernel_mutex branch December 3, 2022 00:13
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.

2 participants