Skip to content

[AMDGPU] Perf: set force-vector-interleave=8 in JIT pipeline#772

Open
paveltc wants to merge 1 commit into
Genesis-Embodied-AI:mainfrom
paveltc:fix/amdgpu-vector-interleave
Open

[AMDGPU] Perf: set force-vector-interleave=8 in JIT pipeline#772
paveltc wants to merge 1 commit into
Genesis-Embodied-AI:mainfrom
paveltc:fix/amdgpu-vector-interleave

Conversation

@paveltc

@paveltc paveltc commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Set -force-vector-interleave=8 via llvm::cl::ParseCommandLineOptions in
compile_module_to_hsaco on first use (guarded by std::call_once).
Vector interleaving allows the LLVM backend to unroll and software-pipeline
loops, keeping more functional units busy across the wider CDNA wavefronts.
The value 8 matches the recommended setting for MI200/MI300 series cards.
No correctness change. Verified with a full not slow test suite run on
AMD MI300X with QD_AMDGPU_FORCE_PERMLANE64_FALLBACK=1:
4166 passed, 0 AMD-related failures (1 pre-existing flaky x64 timing
test unrelated to this change).
Ported from ROCm#8.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cb26b9824

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread quadrants/runtime/amdgpu/jit_amdgpu.cpp Outdated
@paveltc paveltc changed the title perf(amdgpu): set force-vector-interleave=8 in JIT pipeline [AMDGPU] Perf: set force-vector-interleave=8 in JIT pipeline Jul 9, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@paveltc paveltc force-pushed the fix/amdgpu-vector-interleave branch from 2cb26b9 to 5848ae4 Compare July 9, 2026 22:53
@hughperkins

Copy link
Copy Markdown
Collaborator

@codex review

@hughperkins hughperkins added the awaiting-codex-review awaiting-codex-review label Jul 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5848ae4e0d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +305 to +306
struct AMDGPUSetLoopInterleavePass
: public llvm::PassInfoMixin<AMDGPUSetLoopInterleavePass> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep AMDGPU-only pass out of common header

AGENTS.md requires minimizing contact area for new/experimental features; this AMDGPU-specific pass is defined in the shared llvm_context_pass.h outside the AMDGPU guard, so every CPU/CUDA LLVM include site now compiles and depends on the new LoopInfo/LoopPassManager code even though only jit_amdgpu.cpp registers it. Please keep the pass private to the AMDGPU JIT file, or at least under QD_WITH_AMDGPU, to avoid expanding the common LLVM surface area for this backend knob.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thoughts @paveltc ?

@hughperkins hughperkins added awaiting-contributor-action awaiting-contributor-action and removed awaiting-codex-review awaiting-codex-review labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-contributor-action awaiting-contributor-action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants