[rocm-libraries] ROCm/rocm-libraries#10204 (commit 9116b6d)
fix(ck-tile): prefer amd-smi over rocm-smi in remaining TE GEMM benchmarks (#10204) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation PR #9731 centralized GPU SMI access behind `tile_engine/ops/common/smi_utils.py`, which prefers `amd-smi` and transparently falls back to `rocm-smi`, and migrated `gemm_full_benchmark.py` off direct `rocm-smi` calls. Three Tile Engine benchmark scripts were left calling `rocm-smi --showid` directly (with an `amd-smi list` fallback), so the migration is incomplete. Although wrapped in try/except today, these direct calls will break once `rocm-smi` is removed from future ROCm releases. This completes the migration for the remaining scripts, as requested by the tech lead and tracked in JIRA **ROCM-28734**. ## Technical Details Migrated the identical hand-rolled `detect_devices()` (env → `rocm-smi --showid` → `amd-smi list` → hardcoded `["0"]`) to a single `smi_utils.detect_gpu_ids()` call, mirroring the already-landed `gemm_full_benchmark.py`: - `tile_engine/ops/gemm/block_scale_gemm/gemm_bquant/gemm_bquant_full_benchmark.py` - `tile_engine/ops/gemm/gemm_multi_d_full_benchmark.py` - `tile_engine/ops/gemm/streamk_gemm_full_benchmark.py` Each script adds `common/` to `sys.path`, imports `detect_gpu_ids`, and drops the now-unused `import re`. Net -67 lines. ## Test Plan / Result Validated on an MI350 (gfx950) host, exercising the exact `sys.path` arithmetic + `smi_utils` import + `detect_gpu_ids()` for both the shallow (`gemm/`) and deep (`block_scale_gemm/gemm_bquant/`) script locations: - Default (amd-smi first): `detect_devices()` returns the live GPU ids; `count_gpus()`/`check_gpu_available()` consistent. - `CK_SMI_TOOL=rocm-smi` (forced fallback): identical result. Both `python3 -m py_compile` cleanly. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. https://amd-hub.atlassian.net/jira/software/c/projects/AICK/boards/4399?selectedIssue=ROCM-28734 JIRA ID : ROCM-28734 Co-authored-by: Muhammed Emin Ozturk <3836908+ozturkosu@users.noreply.github.com>
M
Muhammed Emin Ozturk committed
0ff4239fa2b5142ba5f6acee0d79e50857f6525a
Parent: c940422
Committed by assistant-librarian[bot] <assistant-librarian[bot]@users.noreply.github.com>
on 8/4/2026, 3:38:35 PM