Skip to content

Emit a usable product name from microbench - #1017

Merged
tsrikris merged 4 commits into
mainfrom
fix/mgehre/microbench-arch-name
Sep 14, 2026
Merged

tsrikris merged 4 commits into
mainfrom
fix/mgehre/microbench-arch-name

Conversation

@mgehre-amd

Copy link
Copy Markdown
Collaborator

Problem

_arch_product_name (TraceLens/PerfModel/benchmarking/microbench.py) decides the name field of the arch JSON that microbench generates. It had two paths:

  1. A memory-tier heuristic (>= 280 -> MI355X, >= 180 -> MI300X).
  2. Otherwise, the last whitespace-separated word of the device string.

For client parts, the device string "AMD Radeon 8060S Graphics" is turned into

{ "name": "Graphics", ... }

This PR fixes it to extract "Radeon_8060S"

_arch_product_name names the arch spec that microbench generates. Off the two
Instinct memory tiers it recognises, it returned the last word of the device
string, which is not a product name: "AMD Radeon 8060S Graphics" ends in a
marketing suffix, so the generated spec was named "Graphics".

Client parts report the model between the brand and that suffix, so it is read
from there instead. The memory tier is left alone and still covers the generic
strings ROCm containers report -- "AMD Radeon Graphics" at 192 GB has nothing
between brand and suffix, so it does not match and resolves to MI300X as before.

Changes:
- The regex only matches the "AMD Radeon <model> Graphics" form, so discrete
  boards ("AMD Radeon RX 7900 XTX") keep the last-word fallback. That form is
  what the affected APUs report; widening it to every Radeon string would need
  a list of marketing suffixes this does not want to carry.
- Names are joined with "_" so the result is usable as an arch JSON stem, the
  way MI300X.json's name field already matches its filename.
- The added test_arch_product_name cases cannot execute anywhere torch is
  installed: 6306fc7 dropped the import from _import_microbench, so it returns
  an unbound name and the torch-gated half of that file raises NameError. CI has
  no torch and skips it, so the suite stays green either way. Restoring those
  imports is left to a separate change.

Tested on gfx1151: the generated spec is now named Radeon_8060S.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tsrikris

tsrikris commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@mohbasit for a review

@tsrikris tsrikris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM but I'll let Abdul confirm

@tsrikris
tsrikris enabled auto-merge (squash) September 10, 2026 19:22
@tsrikris
tsrikris requested a review from mohbasit September 10, 2026 22:17
@tsrikris

Copy link
Copy Markdown
Contributor

@devalshahamd can you approve?

@tsrikris
tsrikris merged commit 8695701 into main Sep 14, 2026
5 checks passed
@tsrikris
tsrikris deleted the fix/mgehre/microbench-arch-name branch September 14, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants