Skip to content

fix: emit uc tag update into epilogue stream when present - #1028

Closed
maleadt wants to merge 1 commit into
intel:masterfrom
maleadt:fix-uc-tag-update-epilogue
Closed

maleadt wants to merge 1 commit into
intel:masterfrom
maleadt:fix-uc-tag-update-epilogue

Conversation

@maleadt

@maleadt maleadt commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #1027.

When appendCommandLists has nothing to dispatch from an idle in-order immediate command list, and the regular command list's batch buffer is dispatched as primary, the queue passes the regular list's first command buffer to flushTaskHeapful as an exactly full task stream (firstCmdListStream), with the immediate list's own stream as optionalEpilogueCmdStream. If the CSR replaced its command buffer during an earlier flush, ucResourceRequiresTagUpdate is set, and the tag update was written into that full task stream, so LinearStream::getSpace aborts. This crashes the oneAPI.jl test suite sporadically, since it submits kernel launches in batches of regular command lists.

This writes the tag update into the epilogue stream when there is one, as the barrier with post-sync in flushTaskHeapful and the UC tag update in flushBcsTask already do. The tag update then follows the task in the same submission. The immediate stream already has room for it: appendCommandLists reserves space there for the epilogue commands, including the barrier.

The new ULT fills the task stream, sets ucResourceRequiresTagUpdate and passes an epilogue stream to flushTask; it aborts without the change and finds the tag update in the epilogue stream with it.

flushTaskHeapless also writes the tag update into the task stream unconditionally but doesn't handle an epilogue stream at all, so I left it alone; I only have heapful hardware (Tiger Lake) to test with.

Tested on 26.35.39758.10, since master doesn't build in our older-glibc environment, for Gen12LP:

When an idle immediate command list dispatches a regular command list's
command buffer as the primary batch buffer, flushTaskHeapful receives
that buffer as an exactly full task stream, with the immediate command
stream as optionalEpilogueCmdStream. A pending UC tag update was still
written into the task stream, so LinearStream::getSpace aborted.

Write it into the epilogue stream instead, as the barrier with post-sync
in flushTaskHeapful and the UC tag update in flushBcsTask already do.

Related-To: intel#1027
Signed-off-by: Tim Besard <tim.besard@gmail.com>
@jwarchul

Copy link
Copy Markdown
Contributor

Hi @maleadt,

Thank you for the contribution.

Merged in commit 443de44.

@jwarchul jwarchul closed this Oct 20, 2026
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.

[GSD-13815] Appending a regular command list to an idle immediate command list aborts in LinearStream::getSpace when a UC tag update is pending

2 participants