Skip to content

fix(hip): support TheRock ROCm 7.x in compatibility matrix#238

Merged
demandal25 merged 4 commits into
ROCm:amd-integrationfrom
eppaneamd:fix/therock-rocm-compat
May 20, 2026
Merged

fix(hip): support TheRock ROCm 7.x in compatibility matrix#238
demandal25 merged 4 commits into
ROCm:amd-integrationfrom
eppaneamd:fix/therock-rocm-compat

Conversation

@eppaneamd
Copy link
Copy Markdown

📌 Description

Fix import flashinfer failure on TheRock ROCm 7.13 nightly builds:

RuntimeError: ROCm version 7.13.26183 is not recognized in the ROCm compatibility matrix.

TheRock nightly builds report HIP version 7.13.x via hipconfig. The _ROCM_ARCH_GROUPS matrix only covered 7.07.3, so the key "7.13" returned empty and triggered the hard error.

Changes to flashinfer/hip_utils.py:

  • Add "7.11", "7.12", "7.13" to _ROCM_ARCH_GROUPS. Arch list verified across TheRock git tags therock-7.11, therock-7.12, therock-7.13.
  • Make hipconfig regex patch-optional: (\d+\.\d+(?:\.\d+)?) — handles potential major.minor-only output.
  • Update get_system_rocm_version docstring: document why hipconfig is preferred over .info/version for TheRock. hipconfig reports the HIP runtime version (consistent with torch.version.hip); .info/version reports the TheRock SDK version, which differs (e.g. TheRock 7.12 has SDK 7.12 but HIP 7.3).

🔍 Related Issues

N/A

🚀 Pull Request Checklist

✅ Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --files flashinfer/hip_utils.py and fixed any reported issues.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

Verified on a TheRock ROCm 7.13 nightly container: import flashinfer succeeds after the fix. No new tests added — the fix is in version detection logic with no kernel changes.

Copilot AI review requested due to automatic review settings May 20, 2026 15:54
Copy link
Copy Markdown

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

Updates ROCm/HIP version detection and the ROCm-arch compatibility mapping so import flashinfer works on TheRock ROCm 7.11–7.13 nightly builds, where hipconfig reports 7.13.x-style versions.

Changes:

  • Relax hipconfig version parsing to accept major.minor or major.minor.patch.
  • Document why TheRock uses hipconfig (HIP runtime version) over .info/version (SDK version).
  • Extend the ROCm compatibility matrix keys to include 7.11, 7.12, 7.13.

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

Comment thread flashinfer/hip_utils.py Outdated
Comment thread flashinfer/hip_utils.py
Copilot AI review requested due to automatic review settings May 20, 2026 19:18
@demandal25 demandal25 self-requested a review May 20, 2026 19:20
Copy link
Copy Markdown

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread flashinfer/hip_utils.py Outdated
Comment thread tests/rocm_tests/test_hip_utils.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Debasis Mandal <Debasis.Mandal@amd.com>
Copilot AI review requested due to automatic review settings May 20, 2026 19:35
Copy link
Copy Markdown
Collaborator

@demandal25 demandal25 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

@demandal25 demandal25 merged commit 3be4c17 into ROCm:amd-integration May 20, 2026
1 check passed
@eppaneamd eppaneamd review requested due to automatic review settings May 20, 2026 19:59
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.

3 participants