Repository navigation
[NFC] Apply clang-format to GridwiseAttnToBlockwise.cpp - #537
Conversation
Pure clang-format run over the existing file. No functional change; the diff is whitespace and comment rewrapping only. Split out of the fully masked attention row work so that change reviews as functional-only. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Formatting-only changes with no unresolved review comments.
Review effort: Lite
Findings: None
What changed in this PR
Applies clang-format to GridwiseAttnToBlockwise.cpp with no functional changes.
Changes:
- Reformats signatures, expressions, assignments, and comments.
- Removes trailing whitespace and normalizes spacing.
| File | Description |
|---|---|
mlir/lib/Dialect/Rock/Transforms/GridwiseAttnToBlockwise.cpp |
Formatting-only updates to attention lowering code. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Verdict: COMMENT · Findings: 1 (0 Critical, 1 Major, 0 Minor)
Scope
Single-file [NFC] clang-format run over mlir/lib/Dialect/Rock/Transforms/GridwiseAttnToBlockwise.cpp (PR #537, bottom of a three-PR stack with #534 / #535). No other files touched.
Findings
I walked every hunk in diff.patch and confirmed the change is genuinely non-functional: each edit is line wrapping, trailing-whitespace removal, comment reflow to 80 columns, or re-indentation. Spot-checked the places where a formatting pass could plausibly hide a semantic change and found none:
expSubstractMaxFromGemm0/updateRowSum/scaleFinalOutput/createAttentionRowStateCorrections— parameter lists rewrapped, argument order and types unchanged at both declaration and call sites (GridwiseAttnToBlockwise.cpp:199,:227,:281,:312).std::tie(maxRowDiffExp, sumRow, maxRow) = updateRowSum(...)at:1338— same six arguments, same binding order.- The
OutOfScopeType::Causal/PrefixCausalcase bodies at:465were under-indented relative to theircaselabels before; the new indentation is a real readability fix and does not alter thearith::CmpIOppredicates or theassert(prefixOffset != nullptr)guard. - The
if (...getElementType() != elemTypeOut)body at:1607was over-indented; only leading whitespace changed.
One process finding: the PR touches a path shared with ROCm/rocMLIR and carries no back-port note. See the inline comment.
Notes
- Reformatting a shared file is exactly the kind of change that makes future back-ports conflict on every hunk, so the back-port question is more load-bearing here than the
[NFC]tag suggests — either land the same format run upstream, or record that the file has diverged past the point of sharing. - The
(e.g. f16 -> f32)comments at:295and:325now break mid-arrow across two lines. That is whatclang-formatproduces for the existing wording and is not a checklist violation; if it bothers you, shortening the prose (rather than adding// clang-format off) keeps the file idempotent under the formatter. - No lit/E2E coverage is expected for a formatting-only change, and none is required by the checklist.
CI status
No failing or cancelled checks. detect, py-checks, and copilot-pull-request-reviewer pass; notify-fork-pr is skipped; review is this auto-review job itself, still in progress.
Summary
Pure
clang-formatrun overmlir/lib/Dialect/Rock/Transforms/GridwiseAttnToBlockwise.cpp. No functional change.Split out of #534 so that the fully-masked-attention-row work reviews as functional-only.
What changed
Whitespace and comment rewrapping only:
expSubstractMaxFromGemm0,updateRowSum,scaleFinalOutput,createAttentionRowStateCorrections).Verification
//markers added by comment rewrapping).rocmlir-genlit suites: 176/176 pass.