Skip to content

[L0] Use immediate command lists for external semaphore wait/signal#21930

Merged
againull merged 1 commit into
intel:syclfrom
winstonzhang-intel:urlza-723
May 11, 2026
Merged

[L0] Use immediate command lists for external semaphore wait/signal#21930
againull merged 1 commit into
intel:syclfrom
winstonzhang-intel:urlza-723

Conversation

@winstonzhang-intel
Copy link
Copy Markdown
Contributor

The L0 spec requires zeCommandListAppendWaitExternalSemaphoreExt and zeCommandListAppendSignalExternalSemaphoreExt to be called on immediate command lists. On Gen12, queues default to regular (non-immediate) command lists, causing these calls to fail with
ZE_RESULT_ERROR_INVALID_ARGUMENT.

Fix by obtaining an immediate command list via getImmCmdList() when the queue is not already using immediate command lists, ensuring external semaphore operations work on all platforms including Gen12.

The L0 spec requires zeCommandListAppendWaitExternalSemaphoreExt and
zeCommandListAppendSignalExternalSemaphoreExt to be called on immediate
command lists. On Gen12, queues default to regular (non-immediate)
command lists, causing these calls to fail with
ZE_RESULT_ERROR_INVALID_ARGUMENT.

Fix by obtaining an immediate command list via getImmCmdList() when the
queue is not already using immediate command lists, ensuring external
semaphore operations work on all platforms including Gen12.

Fixes: URLZA-723
@winstonzhang-intel winstonzhang-intel requested a review from a team as a code owner May 4, 2026 23:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

@intel/llvm-gatekeepers please consider merging

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

@intel/llvm-gatekeepers please consider merging

@againull againull merged commit e928aae into intel:sycl May 11, 2026
44 of 45 checks passed
uditagarwal97 pushed a commit that referenced this pull request May 19, 2026
Revert "[L0] Use immediate command lists for external semaphore
wait/signal (#21930)"

This reverts commit e928aae.


By putting the semaphore on an immediate command list, but still using
the original regular command list for the other graphic operations, we
introduce some unsoundness that can lead to races and problems where the
regular command list is the default. The better choice in the short term
is to simply require that SYCL queues that are intended for semaphore
usage use immediate command lists. I have a separate PR (in progress)
that will make that change to the docs and tests and introduces a
verification.
#22046
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.

4 participants