Skip to content

Add gfx1250 support: GFX_MAP + default GEMM/MHA configs#2282

Open
sunway513 wants to merge 2 commits intoROCm:mainfrom
sunway513:feat/gfx1250-support
Open

Add gfx1250 support: GFX_MAP + default GEMM/MHA configs#2282
sunway513 wants to merge 2 commits intoROCm:mainfrom
sunway513:feat/gfx1250-support

Conversation

@sunway513
Copy link
Collaborator

@sunway513 sunway513 commented Mar 15, 2026

Summary

  • Add GFX ID mapping (18: "gfx1250") to GFX_MAP in chip_info.py
  • Add 27 default config files for gfx1250 (26 base GEMM + 1 MHA), copied from gfx950

Changes

  1. chip_info.py: Add 18: "gfx1250" to GFX_MAP
  2. 27 new config files under aiter/ops/triton/configs/:
    • gemm/gfx1250-*.json (26 files) — base GEMM configs for all kernel types
    • gfx1250-MHA-DEFAULT.json — MHA attention config
    • No N/K specialized tuning files — those will come from GemmTuner in a follow-up PR
    • No code changes to config loading logic — just data files

Why configs instead of code fallback

Per review feedback: explicit config files are preferred over silent fallbacks to avoid masking debug issues. 27 base configs (vs 116 total with N/K specializations) provides functional coverage without bloat.

Verification on gfx1250

Test Before After
test_gemm_a8w8_blockscale KeyError crash 126 passed
test_batched_gemm_bf16 KeyError crash 196 passed
test_ff_a16w16 KeyError crash passing
test_mha (dropout+small head) FileNotFoundError passing
test_fused_add_rmsnorm_pad 216 passed 216 passed (sanity)

Test plan

  • Verified KeyError/FileNotFoundError eliminated on gfx1250
  • Verified no impact on existing gfx942/gfx950 configs
  • Sanity check: previously passing tests still pass
  • Follow-up: gfx1250-tuned configs via GemmTuner (separate PR)
  • Follow-up: N/K specialized configs for performance (separate PR)

Add GFX ID mapping for gfx1250 architecture.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for the gfx1250 GPU architecture by extending the GFX_MAP dictionary with a new entry.

Changes:

  • Added 18: "gfx1250" to the GFX_MAP dictionary in chip_info.py, following the existing sequential ID assignment convention.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@sunway513 sunway513 force-pushed the feat/gfx1250-support branch from da71b90 to b134a21 Compare March 15, 2026 12:49
@sunway513 sunway513 changed the title Add gfx1250 to GFX_MAP Add gfx1250 support: GFX_MAP + GEMM config fallback Mar 15, 2026
valarLip
valarLip previously approved these changes Mar 15, 2026
@azaidy azaidy self-requested a review March 15, 2026 17:02
Copy link
Contributor

@azaidy azaidy left a comment

Choose a reason for hiding this comment

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

I think we need assertion errors instead of fallbacks here. Fallbacks will make debug difficult. We can add default config files for all GEMMs and add an assertion to error out in case the default file doesnt exist.

Add 27 config files for gfx1250 (26 base GEMM + 1 MHA), copied from
gfx950 as initial defaults. Only base configs are included — no N/K
specialized tuning files, which will be added after running GemmTuner.

This resolves KeyError/FileNotFoundError when running Triton GEMM and
MHA kernels on gfx1250, without requiring code changes to the config
loading logic.

Verified on gfx1250:
- test_gemm_a8w8_blockscale: 126 passed
- test_batched_gemm_bf16: 196 passed
- test_ff_a16w16: passing
- test_mha: passing (including dropout/small head_dim cases)
@sunway513 sunway513 force-pushed the feat/gfx1250-support branch from 8e6df9c to dfbcf93 Compare March 15, 2026 17:18
@sunway513 sunway513 changed the title Add gfx1250 support: GFX_MAP + GEMM config fallback Add gfx1250 support: GFX_MAP + default GEMM/MHA configs Mar 15, 2026
@sunway513
Copy link
Collaborator Author

@azaidy Updated per your feedback — replaced code fallback with 27 explicit config files (base GEMM + MHA, no N/K specializations). Zero code changes to config loading logic. Please re-review when you get a chance.

@sunway513 sunway513 mentioned this pull request Mar 16, 2026
4 tasks
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.

4 participants