Repository navigation
feat(packages): submitted NVK work to /dev/gpuN queues - #599
Merged
Merged
Conversation
NVK on a Stellux GPU had no queue, so no device with queues could be created. Submissions past the kernel's limits chain through a private timeline whose failed mark reads as device loss, and a replaced shader local memory area outlives the work reading it, as freeing unmaps it at once.
FlareCoding
force-pushed
the
pr/mesa-exec
branch
from
November 7, 2026 18:18
48feb48 to
65d62de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a Stellux GPU, NVK (Mesa's Vulkan driver for NVIDIA GPUs) had no queue to submit work to, so
vkCreateDevicefailed at NVK's upload queue for any device with queues.Changes
/dev/gpuN) an exec ctx innvkmd_stellux_ctx.c, through which NVK submits a queue's work. Each owns one queue of the device's GPU context,GPU_QUEUE_GRAPHICSfor 3D or compute work andGPU_QUEUE_COPYotherwise, and a private timeline whose next point every submission reaches.GPU_SUBMIT's limits of 32 points and 4096 command ranges goes in a chain of submissions, each later part waiting on the private point of the one before, so a failed part fails the rest. Pushes NVK marks incomplete go in one submission with the push after them, and a run of them past 4096 ranges fails withVK_ERROR_OUT_OF_DEVICE_MEMORY, on which NVK loses the device.GPU_SUBMITwith EBUSY, since the queue holds 64 pending submissions, the exec ctx waits on the CPU for the oldest one's private point and retries once.vkQueueSubmitthen blocks the program's thread until the queue has room or the device is lost, and when the oldest submission waits on a point that thread alone would signal, only a loss ends the block.GPU_SUBMITloses the device with the kernel's reason for the lost context.