Repository navigation
fix(clr) - hipDeviceGetLuid API fixes for WSL - #14741
Merged
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public API documentation still promises no support and untouched outputs on all non-Windows platforms, contradicting the new WSL behavior of hipDeviceGetLuid.
1 open issue
What changed in this PR
This PR enables hipDeviceGetLuid on WSL when the backend reports a valid LUID, aligning its behavior with hipGetDeviceProperties.
Changes:
- Replace the compile-time Linux restriction with a backend LUID check.
- Update tests to verify supported and unsupported behavior and agreement between the two APIs.
| File | Description |
|---|---|
projects/hip-tests/catch/unit/device/hipDeviceGetLuid.cc |
Test backend-dependent support and consistency with device properties. |
projects/clr/hipamd/src/hip_device.cpp |
Allow LUID queries when the backend provides a non-zero LUID. |
Review effort: Balanced
mangupta
reviewed
Nov 2, 2026
WSL returns valid value so make use of it
agunashe
force-pushed
the
users/agunashe/getluid_wsl
branch
from
November 2, 2026 20:18
452b57d to
e172a04
Compare
Contributor
|
🤖 AI-assisted pre-review (for @mangupta) Re-reviewed the updated head ( |
chrispaquot
approved these changes
Nov 3, 2026
Contributor
TheRock Submodule Bump ActivityNewest first
|
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.

Motivation
hipDeviceGetLuid API fixes for WSL
WSL returns valid value so make use of it
Technical Details
hipDeviceGetLuid gated on the compile-time IS_LINUX and so returned hipErrorNotSupported under WSL, even though hipGetDeviceProperties reported a real DXGI adapter LUID from the same backend — making the two APIs contradict each other and failing the cross-check test.
The gate now keys off whether the backend actually reports a LUID (luidLowPart_/luidHighPart_ non-zero), so native Linux still returns hipErrorNotSupported while WSL and Windows return the same values hipGetDeviceProperties does; the test was rewritten to assert that agreement in both directions instead of branching on _WIN32.
Issue Tracking
JIRA ID: AIRUNTIME-3125
Test Plan
hip-tests should succeed on linux and windows.
Unit_hipDeviceGetLuid_* should pass on WSL env as wel
Test Result
hip-tests should succeed on linux and windows.
Unit_hipDeviceGetLuid_* should pass on WSL env as wel
Submission Checklist