Skip to content

test(rocke): recognize WSL /dev/dxg in the GPU-availability gate#9254

Open
shumway wants to merge 1 commit into
developfrom
users/shumway/rocke-enable-wsl
Open

test(rocke): recognize WSL /dev/dxg in the GPU-availability gate#9254
shumway wants to merge 1 commit into
developfrom
users/shumway/rocke-enable-wsl

Conversation

@shumway

@shumway shumway commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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

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>
@therock-pr-bot

therock-pr-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

therock-pr-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants