Repository navigation
xpu: ask Level Zero for the driver and device counts before the lists - #1672
Merged
Merged
Conversation
This was referenced Oct 30, 2026
Merged
zeDriverGet and zeDeviceGet were called once with a preset count of 8. On WSL2 with an Iris Xe (loader 1.16, NEO 23.43) the loader left the count as asked and filled the rest with null handles, and zeDeviceGetProperties on a null handle crashed. Both enumerations (context.enumerate and Gpu.open) now query the count first, clamp it to the array, and skip null handles.
Owner
|
Thank you @jschmied. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Owner
|
Thanks @jschmied! The Level Zero device listing fix, so |
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.
Problem
context.enumerateandze.Gpu.opencalledzeDriverGetandzeDeviceGetonce, with the count preset to the array size (8). On WSL2 with an Iris Xe (Level Zero loader 1.16, NEO 23.43), the loader returned that count unchanged and filled the slots past the real devices with null handles.zeDeviceGetPropertieson the first null handle then crashedtensorfold-xpu devicesand every test that opens a device.Change
Both enumerations now follow the Level Zero pattern:
No other behaviour changes.
Checks
tensorfold-xpu devicescrashed; after, it lists the one device. The SPIR-V build fortgllpstill stops atnem_attn_dec.cl(DPAS); the follow-up PR handles that.zig build test, the contract, golden, security and fuzz steps pass;git diff --checkis clean.