Skip to content
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

[L0] Maintain Lock of Queue while syncing the Last Command Event and update Last Command Event only if matching #1749

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

nrspruit
Copy link
Contributor

  • To avoid usecases where the LastcommandEvent could be updated in another thread and a thread can be expecting the Queue Wait to include this event, then hold the queue lock such that the last command event remains unchanged during synchronization.

- To avoid usecases where the LastcommandEvent could be updated in
  another thread and a thread can be expecting the Queue Wait to include
this event, then hold the queue lock such that the last command event
remains unchanged during synchronization.

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
@github-actions github-actions bot added the level-zero L0 adapter specific issues label Jun 12, 2024
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 12, 2024
pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 12, 2024
pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 12, 2024
pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
@nrspruit nrspruit added the v0.9.x Include in the v0.9.x release label Jun 12, 2024
@nrspruit nrspruit marked this pull request as ready for review June 12, 2024 20:12
@nrspruit nrspruit requested a review from a team as a code owner June 12, 2024 20:12
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

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

can we add a multi-threaded test that exercises this path? If merging this is urgent, we should at least create an issue to add one.

source/adapters/level_zero/queue.cpp Show resolved Hide resolved
@nrspruit nrspruit changed the title [L0] Maintain Lock of Queue while syncing the Last Command Event [L0] Maintain Lock of Queue while syncing the Last Command Event and update Last Command Event only if matching Jun 13, 2024
@nrspruit nrspruit force-pushed the fix_NonBlocking_LastCommand branch from 5df64a3 to 44370e3 Compare June 13, 2024 18:50
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 13, 2024
…and update Last Command Event only if matching

pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
@nrspruit nrspruit force-pushed the fix_NonBlocking_LastCommand branch from 44370e3 to a461778 Compare June 13, 2024 19:09
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 13, 2024
…and update Last Command Event only if matching

pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
nrspruit added a commit to nrspruit/llvm that referenced this pull request Jun 13, 2024
…and update Last Command Event only if matching

pre-commit PR for oneapi-src/unified-runtime#1749

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
@nrspruit nrspruit added the ready to merge Added to PR's which are ready to merge label Jun 13, 2024
@kbenzie kbenzie merged commit 2c86cd8 into oneapi-src:main Jun 14, 2024
53 checks passed
kbenzie added a commit that referenced this pull request Jun 14, 2024
[L0] Maintain Lock of Queue while syncing the Last Command Event and update Last Command Event only if matching
steffenlarsen pushed a commit to intel/llvm that referenced this pull request Jun 14, 2024
…14150)

pre-commit PR for
oneapi-src/unified-runtime#1749

---------

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level-zero L0 adapter specific issues ready to merge Added to PR's which are ready to merge v0.9.x Include in the v0.9.x release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants