Repository navigation
core: enable WSL backend for amdsmi on non-Windows - #7102
Merged
Merged
Conversation
✅ 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. |
JeniferC99
reviewed
Aug 6, 2026
JeniferC99
left a comment
Contributor
There was a problem hiding this comment.
pending on ROCm/rocm-systems#9725. Also this pr is duplicate for #6885, please close either this or that one.
3 tasks
Pass -DENABLE_WSL_BACKEND=ON to the amdsmi subproject so that the experimental WSL (WDDM/dxg) GPU backend is compiled in on Linux/WSL builds. The backend dlopen's librocdxg.so at runtime, so no additional build or runtime dependencies are required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marifamd
force-pushed
the
users/shuzhliu/amdsmi-enable-wsl-backend
branch
from
August 18, 2026 18:56
1147b2f to
3dd4d5f
Compare
Contributor
|
Please share confirmation that the .so produced has the WSL symbols. CI results look good overall. |
Contributor
Author
|
Confirmed directly from the CI artifact (run 32498518713):
$ strings /tmp/core-amdsmi-extract/core/amdsmi/stage/lib/libamd_smi.so.27.0.0 | grep rocdxg
|
jayhawk-commits
approved these changes
Aug 25, 2026
4 tasks done
marifamd
added a commit
that referenced
this pull request
Sep 1, 2026
## Summary Follow-up to #7102, which added `-DENABLE_WSL_BACKEND=ON` to the `amdsmi` subproject unconditionally. TheRock already has a switch for this component, `THEROCK_ENABLE_WSL_ROCDXG` (feature group `WSL`, off in default/CI builds). With the backend forced on, the two disagree: - Default builds ship an amdsmi WSL backend that `dlopen`s `librocdxg.so`, while the `wsl-rocdxg` subproject that produces that library is not built. The `dlopen` just fails at runtime, so nothing breaks, but the code is dead weight in every default build. - `ENABLE_WSL_BACKEND=ON` is not dependency-free on the amdsmi side. It has a `FATAL_ERROR` gate requiring `rocr-runtime/libhsakmt/include/hsakmt/rocdxg_smi.h`, resolved through a hardcoded sibling path. That works today only because `rocm-systems` is checked out whole, and it is a build-time dependency default builds should not take on. This makes the amdsmi flag follow TheRock's existing switch, matching the `-DBUILD_TESTS=${THEROCK_BUILD_TESTING}` pattern on the adjacent line. Turning on `THEROCK_ENABLE_WSL_ROCDXG` now builds both the bridge library and the amdsmi backend that consumes it. ## JIRA ID ROCM-28065 ## Test plan Verified `THEROCK_ENABLE_WSL_ROCDXG` is a `CACHE BOOL` created by `therock_add_feature`, and that `therock_finalize_features()` (top-level `CMakeLists.txt:277`) runs well before `add_subdirectory(core)` (`CMakeLists.txt:503`), so the variable is in scope at the point of use. Substitution checked for every state: | `THEROCK_ENABLE_WSL_ROCDXG` | Emitted argument | |---|---| | `OFF` | `-DENABLE_WSL_BACKEND=OFF` | | `ON` | `-DENABLE_WSL_BACKEND=ON` | | undefined | `-DENABLE_WSL_BACKEND=` (falsey; amdsmi's `option(... OFF)` default preserved, no error) | - [x] Default Linux build no longer compiles the WSL backend (restores pre-#7102 artifact content) - [x] `THEROCK_ENABLE_WSL_ROCDXG=ON` propagates `ENABLE_WSL_BACKEND=ON` to amdsmi - [x] Windows unaffected (change stays inside the existing `if(NOT WIN32)` guard) - [x] `pre-commit run --files core/CMakeLists.txt docs/development/wsl_rocdxg.md` passes Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
6 tasks
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
-DENABLE_WSL_BACKEND=ONto theamdsmisubproject so the experimental WSL (WDDM/dxg) GPU backend is compiled in on Linux/WSL builds.librocdxg.soat runtime, so no additional build or runtime dependencies are required in TheRock.if(NOT WIN32)guard, so Windows builds are unaffected.JIRA ID : ROCM-28065
Test plan
THEROCK_ENABLE_CORE_AMDSMI=ONon Linuxlibamd_smi.soincludes the WSL backend symbols whenENABLE_WSL_BACKEND=ONWIN32code path)🤖 Generated with Claude Code