Skip to content

[SYCL] Protect access to the pi_context, pi_device and pi_platform #6244

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
Jun 13, 2022

Conversation

againull
Copy link
Contributor

@againull againull commented Jun 3, 2022

No description provided.

@againull againull requested a review from a team as a code owner June 3, 2022 19:37
@againull againull requested a review from smaslov-intel June 3, 2022 19:37
@againull againull requested a review from smaslov-intel June 6, 2022 17:33
againull added 2 commits June 9, 2022 16:04
* Remove limit for commandlists in the cache.
* Protect access to ZeCache with its own mutex.
Access to ZeCache using -> can trigger computation of the property and
we don't know when this is going to happen, so need to use unique_lock
for each access because each access can potentially do write.
* Remove unnecessary device locks considering ZeCache properties are guarded
with their own lock, many data members are const and other members like
SubDevices and QueueGroup vectors are calculated only once during
caching of devices and its subdevices.
* Lock context for shared access in piextUSMDeviceAlloc and
piextUSMHostAlloc.
@againull againull requested a review from a team as a code owner June 10, 2022 00:20
Copy link
Contributor

@pvchupin pvchupin left a comment

Choose a reason for hiding this comment

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

doc ok

@againull againull requested a review from smaslov-intel June 10, 2022 15:01
@againull againull merged commit 8f97fe2 into intel:sycl Jun 13, 2022
@pvchupin
Copy link
Contributor

@againull, please fix post-commit issue on Windows: https://github.com/intel/llvm/runs/6865665237?check_suite_focus=true

steffenlarsen added a commit to steffenlarsen/llvm that referenced this pull request Jun 14, 2022
intel#6244 changed the L0 backend to use
std::scoped_lock for various occasions. However, when building with MSVC
some of the uses are done through copying. Since std::scoped_lock has
its copy-constructor deleted this causes the build to fail. This commit
changes this pattern to avoid the copy.

Signed-off-by: Larsen, Steffen <[email protected]>
pvchupin pushed a commit that referenced this pull request Jun 14, 2022
#6244 changed the L0 backend to use
std::scoped_lock for various occasions. However, when building with MSVC
some of the uses are done through copying. Since std::scoped_lock has
its copy-constructor deleted this causes the build to fail. This commit
changes this pattern to avoid the copy.

Signed-off-by: Larsen, Steffen <[email protected]>
@againull againull deleted the protect_device_context_platform branch December 3, 2022 00:12
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