-
Notifications
You must be signed in to change notification settings - Fork 803
[SYCL] Fix race in kernel_impl::getName
#21012
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
Conversation
|
I think this is throwing the below then hanging in check-sycl or check-sycl-unittests |
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.
Pull request overview
This PR fixes a race condition in kernel_impl::getName() that could occur when multiple threads concurrently access the same kernel object. The fix ensures thread-safe lazy initialization of the kernel name using std::call_once.
Key changes:
- Added thread-safe lazy initialization to
kernel_impl::getName()usingstd::call_once - Added regression test to verify concurrent kernel submission to the same queue works correctly
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sycl/source/detail/kernel_impl.cpp | Implements thread-safe lazy initialization of kernel name using std::call_once and std::once_flag |
| sycl/test-e2e/Regression/queue_submit.cpp | Adds regression test that submits the same kernel from multiple threads to verify the race condition fix |
sergey-semenov
left a comment
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.
LGTM overall
|
Failure in |
No description provided.