Skip to content

rocm-bootstrap: add gfx117X (gfx1170, gfx1171) targets - #13969

Open
ethanwee1 wants to merge 3 commits into
developfrom
ethanwee1-gfx117x-bundle
Open

ethanwee1 wants to merge 3 commits into
developfrom
ethanwee1-gfx117x-bundle

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Oct 21, 2026 •

Copy link
Copy Markdown

Motivation

Problem

rocm-bootstrap does not recognize gfx1170/gfx1171, so rocm-kpack fails
while splitting otherwise valid PyTorch wheels with Unknown bundle key.

ROCm/rockrel run 39549503111
reproduced this after all 16 Windows PyTorch wheels compiled successfully.

Technical Details

Changes

  • Register gfx1170/gfx1171 targets and the gfx117x sub-family.
  • Add the gfx11_7 alias and GFX11 family membership.
  • Assign gfx11-7-generic to gfx117x.
  • Move gfx11-generic from the GFX11 family to gfx110x/gfx115x.
  • Leave the mixed-generic GFX11 family without an unsafe generic target.
  • Add hierarchy, lookup, XNACK, generic-assignment, and invariant coverage.
  • Update detection examples to show generics at sub-family scope.

Scope excludes gfx1172 because TheRock currently defines gfx1170/gfx1171.

Issue Tracking

Linux has a separate Composable Kernel build dependency handled by the linked
PyTorch release backports. This PR fixes the common bundle registry and splitter.

Test Plan

Validation

  • Full rocm-bootstrap suite: 734 passed.
  • Focused package pre-commit: passed.
  • black, mdformat, whitespace, merge-conflict, and line-ending checks passed.
  • gfx1170/gfx1171 resolve through target, sub-family, and family packaging chains.
  • XNACK remains unsupported, matching clang behavior for gfx1170.

Test Result

The original unknown-bundle failure is fixed. GFX11.7 uses
gfx11-7-generic; gfx110x/gfx115x retain gfx11-generic safely.

Submission Checklist

lookup_bundle('gfx1170') raised ValueError because the target table had
no GFX11.7 entries, breaking rocm-kpack fat-wheel splitting for any
build that includes gfx117X.

Declares the two targets and a gfx117x sub-family; target-level bundle
keys are then generated by _build_target_bundle_map. The sub-family
carries llvm_generic="gfx11-7-generic", which LLVM exposes separately
from gfx11-generic.

AIPYTORCH-1538
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the gfx1170/gfx1171 target-registry additions.

No open issues 🎉

What changed in this PR

Adds gfx1170/gfx1171 support to rocm-bootstrap’s target registry, resolving missing bundle lookups that block Windows fat-wheel splitting in rocm-kpack.

Changes:

  • Registers both targets, the gfx117x sub-family, and the gfx11_7 alias.
  • Assigns gfx11-7-generic to the new sub-family while retaining the existing family generic and clarifying its coverage comment.
  • Extends tests for target counts, architecture fields, XNACK support, aliases, packaging hierarchy, and generic mapping.
File Description
python/​rocm-bootstrap/​python/​rocm_bootstrap/​tests/​test_targets.py Extends registry and lookup tests for GFX11.7 targets.
python/​rocm-bootstrap/​python/​rocm_bootstrap/​targets.py Adds GFX11.7 targets, bundles, family membership, and alias registration.

Review effort: Balanced

@JeniferC99
JeniferC99 requested a review from a team November 4, 2026 22:07
@peymanr

peymanr commented Nov 4, 2026

Copy link
Copy Markdown

PR Pundit review

(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. Please reply to each point, whether it applies or not: we harvest these replies, and both kinds are enormously helpful for tuning the agent. Reach out to @peymanr for suggestions.)

# Finding Where
1 🟠 Verbose detect on gfx1170/1171 reports family generic gfx11-generic that cannot run on them: this PR added GFX11.7 to BUNDLE_GFX11 python/rocm-bootstrap/python/rocm_bootstrap/targets.py:579

1. 🟠 Should fix: Verbose detect on gfx1170/1171 reports family generic gfx11-generic that cannot run on them: this PR added GFX11.7 to BUNDLE_GFX11

python/rocm-bootstrap/python/rocm_bootstrap/targets.py:579

This PR adds GFX1170/GFX1171 to BUNDLE_GFX11 while keeping its family-level llvm_generic="gfx11-generic", which does not cover GFX11.7 (it has its own gfx11-7-generic); the PR's own comment admits this. On a gfx1170/1171 machine detect.py --verbose shows family: gfx11 ... generic: gfx11-generic, and a consumer compiling the family package with --offload-arch=<family llvm_generic> would produce code that does not load on those GPUs. test_gfx11_family_has_gfx11_generic only checks the string, so nothing guards the mismatch. Set llvm_generic=None at family level (as gfx9/gfx12 do when the generic covers only some sub-families), keep generics on sub-families, and add an invariant test; update the README and comment.

Who is affected: Users running verbose detection on gfx1170/gfx1171, and any external consumer that uses the gfx11 family bundle's llvm_generic to choose a compile target.

Checked against the code by an independent pass.

Related past reviews: #11715 on projects/clr/rocclr/device/device.cpp, #11715 on projects/clr/hipamd/src/hip_fatbin.cpp

Shared from a pilot of PR Pundit, an agentic code reviewer that builds and tests the change and reads the project's past reviews. Reviewed at bf4f092b; findings checked and posted by @peymanr; points already raised on this PR are left out.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants