Repository navigation
[ROCm] Migrate SMI device queries from rocm_smi to amd_smi - #1144
Merged
mminutoli merged 1 commit intoAug 28, 2026
Conversation
Cherry-pick of #1113 (02298de) with SMI-only Bazel changes on this release branch. Unblocks JAX wheel builds when librocm_smi64 is absent from the ROCm SDK (ROCm/TheRock#6852). (cherry picked from commit 45f7885)
mminutoli
approved these changes
Aug 28, 2026
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.
Ports the SMI migration (#1113) to
rocm-jaxlib-0.11.1-alpha, ahead ofTheRock#6852, which removes
librocm_smi64from the ROCm SDK.This is the ref that
ROCm/jaxrocm-jaxlib-v0.11.1actually consumes. Thatbranch builds with bzlmod (
common --enable_bzlmod --noenable_workspace), soits XLA comes from the
archive_overrideinMODULE.bazel, which pins thisbranch — not from
third_party/xla/revision.bzl. The earlier port torocm-jaxlib-v0.11.1(#1140) therefore never reached the JAX wheel build, andTheRock CI still failed with:
Changes
Device queries move behind
smi_util.h, with one backend compiled in perbuild. The
:smialias and backend selection follow the existingrocm_version_number() >= 71300gate, so ROCm >= 7.13 (including ROCm 10.x,which encodes as
100100) resolves toamd_smiand never pulls:rocm_smi, whoseinterface_libraryhard-referenceslibrocm_smi64.so.Relative to the raw cherry-pick, the only conflict resolution was in
third_party/gpus/rocm/BUILD.tpl: this branch already carriedamdsmi_libsasa plain
cc_library, so it is converted to a fullrocm_lib_importwith aninterface_library, keeping the existing:system_libsdep.Verification
Built against a full ROCm 7.14 SDK with
librocm_smi64.so*deleted, simulatingTheRock#6852:
smi_util,rocm_pcie_bandwidth,rocm_xgmi_topology,rocm_executorall build.jax-rocm-pjrtwheel builds fromROCm/jaxrocm-jaxlib-v0.11.1.xla_rocm_plugin.solistslibamd_smi.so.26asNEEDED, withno
librocm_smi64entry.