Skip to content

Remove unnecessary ROCm HSA_OVERRIDE_GFX_VERSION override (#469)#769

Open
noahkhomer18 wants to merge 1 commit into
jamiepine:mainfrom
noahkhomer18:fix-rocm-override
Open

Remove unnecessary ROCm HSA_OVERRIDE_GFX_VERSION override (#469)#769
noahkhomer18 wants to merge 1 commit into
jamiepine:mainfrom
noahkhomer18:fix-rocm-override

Conversation

@noahkhomer18

@noahkhomer18 noahkhomer18 commented Jun 20, 2026

Copy link
Copy Markdown

Closes #469

Summary by CodeRabbit

Bug Fixes

  • Improved AMD GPU environment configuration handling to better respect existing user settings while maintaining necessary performance defaults.

)

Dropping the automatic override that spoofs RDNA 3/4 GPUs as RDNA 2,
which harms performance on those architectures. Users who need this
override can set it via environment file instead.
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d1e5ca6-0cd9-43e4-b7a1-a72745f79f25

📥 Commits

Reviewing files that changed from the base of the PR and between b35b909 and 50fd2ba.

📒 Files selected for processing (1)
  • backend/app.py
💤 Files with no reviewable changes (1)
  • backend/app.py

📝 Walkthrough

Walkthrough

Removes the three lines in backend/app.py that conditionally set HSA_OVERRIDE_GFX_VERSION to "10.3.0" before importing torch. Only the MIOPEN_LOG_LEVEL guard remains; the AMD GFX version override is now left entirely to the user's environment.

Changes

AMD GPU Environment Variable Cleanup

Layer / File(s) Summary
Remove HSA_OVERRIDE_GFX_VERSION default
backend/app.py
Deletes the conditional os.environ["HSA_OVERRIDE_GFX_VERSION"] = "10.3.0" block, so AMD GPUs with native ROCm support (RDNA 3/4) are no longer spoofed as RDNA 2 at startup.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Three lines removed, the GPU breathes free,
No longer pretending what it cannot be,
RDNA 4 shines with its own GFX name,
No more RDNA 2 masquerade game.
Hop hop, the environment knows best! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing an unnecessary ROCm environment variable override that was previously applied automatically.
Linked Issues check ✅ Passed The code changes directly address issue #469 by removing the automatic HSA_OVERRIDE_GFX_VERSION override, implementing the first proposed solution and allowing users to set it manually via environment configuration.
Out of Scope Changes check ✅ Passed All changes are directly related to the removal of the HSA_OVERRIDE_GFX_VERSION override as specified in issue #469, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

ROCm HSA_OVERRIDE_GFX_VERSION unnecessary/harmful for RDNA 3 / 4 GPUs

1 participant