test(rocke): recognize WSL /dev/dxg in the GPU-availability gate#9254
Open
shumway wants to merge 1 commit into
Open
test(rocke): recognize WSL /dev/dxg in the GPU-availability gate#9254shumway wants to merge 1 commit into
shumway wants to merge 1 commit into
Conversation
The platform pytest suite gated on-GPU tests on the presence of the /dev/kfd device node. Under WSL, ROCm reaches the GPU through the DXG bridge (/dev/dxg); /dev/kfd is absent even though kernels launch fine. As a result every @_requires_gpu test skipped on WSL, so a "green" run exercised no on-GPU execution. Accept /dev/dxg in addition to /dev/kfd. The probe stays torch-free and issues no HIP call (no hang risk), and the /dev/kfd path is unchanged, so native-Linux runners are unaffected. On a gfx1151 WSL box this turns the three torch-free lowerer round-trip tests from skip into real on-GPU passes (verified: 3 pass with the device visible, and all three fail at hipInit when the device is hidden). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
averinevg
reviewed
Jul 10, 2026
Comment on lines
+102
to
+105
| # A ROCm GPU exposes a device node the runtime can open: /dev/kfd on native | ||
| # Linux, or /dev/dxg under WSL, where ROCm reaches the GPU through the DXG | ||
| # bridge. Absence of both means launches/module loads cannot succeed and would | ||
| # hang; skip then. |
Contributor
There was a problem hiding this comment.
/dev/dxg is the WSL GPU bridge, not something ROCm-specific. So the comment's framing that "a ROCm GPU exposes ... /dev/dxg under WSL" isn't quite right: its presence really signals "WSL with GPU passthrough," not that a ROCm-capable GPU is actually there.
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.
Issue Id : AICK-1517
Motivation
As we are working on enabling CI and improving testing, it's helpful to run the tests locally on gfx1151 under WSL. This PR fixes a restriction that caused WSL to report "no GPU" even on a working rocm-7.13 distribution.
Technical Details
The platform pytest suite gated on-GPU tests on the presence of the /dev/kfd device node. Under WSL, ROCm reaches the GPU through the DXG bridge (/dev/dxg); /dev/kfd is absent even though kernels launch fine. As a result every @_requires_gpu test skipped on WSL, so a "green" run exercised no on-GPU execution.
Accept /dev/dxg in addition to /dev/kfd. The probe stays torch-free and issues no HIP call (no hang risk), and the /dev/kfd path is unchanged, so native-Linux runners are unaffected. On a gfx1151 WSL box this turns the three torch-free lowerer round-trip tests from skip into real on-GPU passes (verified: 3 pass with the device visible, and all three fail at hipInit when the device is hidden).
Test Plan
Tested locally with
run_all_tests.py.Test Result
Three previously skipped platform tests now return passing results.
Submission Checklist