[rocm-libraries] ROCm/rocm-libraries#10445 (commit bf5eb0a)
fix(ck-tile): prefer amd-smi for dispatcher GPU-arch
detection (#10445)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
Extends the amd-smi-first migration (#9731, #10204) from the Tile Engine
to the
dispatcher's GPU-architecture detection.
- Adds `detect_gpu_arch()` to the shared
`tile_engine/ops/common/smi_utils.py`
wrapper: amd-smi `static` (`TARGET_GRAPHICS_VERSION`) first, rocm-smi
`--showproductname` (`GFX Version`) fallback — same amd-smi-first policy
as the
rest of the wrapper.
- `dispatcher_common.detect_gpu_arch()`: prefers amd-smi via the
wrapper, then
rocminfo, then the caller-supplied default. Also removes a **duplicate**
definition of this function.
- `gemm_utils._get_arch()`: tries amd-smi via the wrapper before
rocminfo,
preserving the raise-on-unresolved (no silent default) behavior.
## Motivation
Per the directive behind #9731, device-property access should prefer
`amd-smi` (rocm-smi is being phased out). The Tile Engine was already
migrated
(#9731, #10204); the dispatcher still detected the GPU arch by shelling
out to
`rocminfo` directly. Tracked in JIRA **ROCM-28734**.
## Design note
The dispatcher reaches the sibling `tile_engine/ops/common/smi_utils.py`
through
a guarded import and falls back to `rocminfo` if the wrapper is
unavailable, so
behavior is unchanged on hosts without amd-smi. (Open to moving the
shared
wrapper to a neutral location if reviewers prefer avoiding the
dispatcher →
tile_engine reach.)
## Test plan (MI350X / gfx950)
- [x] New mock-based unit tests for `detect_gpu_arch()` (amd-smi
preference,
rocm-smi fallback, default) + a live check — 4/4 pass.
- [x] `dispatcher_common.detect_gpu_arch()` and `gemm_utils._get_arch()`
both
return `gfx950` via amd-smi on the live host.
- [x] `test_gemm_utils` 21/21 still pass (no arch-detection regression). M
Muhammed Emin Ozturk committed
91bdde333f6394a43d75417f6af25dfcbc024814
Parent: 4c799dd
Committed by assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com>
on 8/11/2026, 7:57:44 PM