Skip to content

Apply black 26.3.1 formatting to glu_hadamard_quant and glu python files - #669

Merged
Anerudhan merged 1 commit into
NVIDIA:developfrom
Anerudhan:black-format-glu-hadamard-quant
Aug 19, 2026
Merged

Apply black 26.3.1 formatting to glu_hadamard_quant and glu python files#669
Anerudhan merged 1 commit into
NVIDIA:developfrom
Anerudhan:black-format-glu-hadamard-quant

Conversation

@Anerudhan

@Anerudhan Anerudhan commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Before submitting

  • I agree to license this contribution under the terms of LICENSE.txt.
  • I ran pre-commit run and committed any formatting changes.
  • I added GitHub labels: one cat-*, one or more mod-*, and one orig-* (see label list).

Affected area

FE OSS kernels or CuTeDSL

Summary

Formatting-only change: run black --line-length 160 (black 26.3.1, the version the format CI now uses) over the Python tree. Six files under python/cudnn/gemm/cutedsl/grouped/ (glu_hadamard_quant/* and glu/_blockscaled_api.py) get reformatted; no code changes.

Why

The style-check CI job (analysis:clang-format, which also runs black --check) fails on current develop because these files were merged before the CI's black version was bumped to 26.3.1, which formats them differently. Every open PR/MR now inherits this failure. Applying the new formatter output unblocks the check.

Related issues

None.

API and compatibility impact

None — formatting only; black verifies AST equivalence.

Testing

find test/ python/ -regex '.*\.py$' | xargs black --check --line-length 160
# All done! 599 files would be left unchanged.
find ./ -maxdepth 1 -regex '.*\.py$' | xargs black --check --line-length 160
# All done! 1 file would be left unchanged.

(black 26.3.1, matching CI.)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Reorganized and standardized internal GEMM, GLU, Hadamard, and NVFP4 quantization code.
    • Preserved existing Rubin kernel behavior, validation, scheduling, and quantization workflows.
  • Style
    • Improved formatting, spacing, multiline expressions, and error-message presentation.
    • Simplified redundant syntax without changing results or functionality.

black 26.3.1 (the version now used by format CI) reformats 6 files under
python/cudnn/gemm/cutedsl/grouped/. Formatting-only change, no functional
difference (black verifies AST equivalence).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Anerudhan Anerudhan added orig-nv-eng Reported or requested by NVIDIA engineering. mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. cat-cleanup labels Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 86241d20-b808-45b3-938f-154d05ef9979

📥 Commits

Reviewing files that changed from the base of the PR and between 9b2058b and 0604b17.

📒 Files selected for processing (6)
  • python/cudnn/gemm/cutedsl/grouped/glu/_blockscaled_api.py
  • python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/api.py
  • python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/moe_blockscaled_grouped_gemm_glu_hadamard_quant.py
  • python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/moe_blockscaled_grouped_gemm_glu_hadamard_quant_rubin.py
  • python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/quant_utils.py
  • python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/rht_utils.py

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

Changes

GLU Hadamard quantization

Layer / File(s) Summary
Validation and helper expression cleanup
python/cudnn/gemm/cutedsl/grouped/glu/_blockscaled_api.py, python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/...
Existing validation, sizing, range, transform, and scaling expressions are reformatted or condensed.
Rubin B-reuse GEMM setup
python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/moe_blockscaled_grouped_gemm_glu_hadamard_quant_rubin.py
B-reuse validation, MMA setup, scale broadcast layout, output partitioning, and split GEMM calls retain their existing behavior.
Rubin activation epilogue
python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/moe_blockscaled_grouped_gemm_glu_hadamard_quant_rubin.py
The ACT epilogue now uses an explicit loop for B-keep and B-reuse halves.
Rubin RHT and NVFP4 epilogue
python/cudnn/gemm/cutedsl/grouped/glu_hadamard_quant/moe_blockscaled_grouped_gemm_glu_hadamard_quant_rubin.py
The quantized epilogue now uses an explicit loop for FWHT, NVFP4 stores, scale-row writes, and synchronization.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0604b

This change only reformats existing Python code to match the repository’s Black version and does not alter behavior or compatibility. No actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the Black 26.3.1 formatting change and affected Python files.
Description check ✅ Passed The description completes all required sections and provides the scope, rationale, compatibility impact, and exact formatting checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@Anerudhan Anerudhan added this to the Frontend 1.28.0 milestone Aug 19, 2026
@Anerudhan Anerudhan self-assigned this Aug 19, 2026
@Anerudhan
Anerudhan merged commit 43d7332 into NVIDIA:develop Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat-cleanup mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. orig-nv-eng Reported or requested by NVIDIA engineering.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants