Skip to content

Conversation

@realAsma
Copy link
Contributor

@realAsma realAsma commented Jan 23, 2026

What does this PR do?

Type of change: ? Minor

Overview: ?

Usage

# Add a code snippet demonstrating how to use this

Testing

Before your PR is "Ready for review"

  • Make sure you read and follow Contributor guidelines and your commits are signed.
  • Is this change backward compatible?: Yes/No
  • Did you write any new necessary tests?: Yes/No
  • Did you add or update any necessary documentation?: Yes/No
  • Did you update Changelog?: Yes/No

Additional Information

Summary by CodeRabbit

  • Bug Fixes
    • Automatically disables fuse_wgrad_accumulation when using ModelOpt quantization with Transformer Engine-based quantization paths. A warning is now displayed to notify users when this adjustment occurs.

✏️ Tip: You can customize this high-level summary in your review settings.

@realAsma realAsma requested a review from a team as a code owner January 23, 2026 21:37
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This change adds safeguards to two Transformer Engine quantization methods (_QuantTELinear._setup and _QuantTEGroupedLinear._setup) that disable fuse_wgrad_accumulation when ModelOpt quantization is active, emitting warnings to prevent incompatible configurations. A TODO comment is also added regarding per-gemm quantizer support.

Changes

Cohort / File(s) Summary
TE Quantization Guards
modelopt/torch/quantization/plugins/transformer_engine.py
Added guards in _QuantTELinear._setup and _QuantTEGroupedLinear._setup that check for fuse_wgrad_accumulation, emit a warning if enabled, and forcibly set it to False. Introduced a TODO comment about supporting per-gemm quantizers for GroupedLinear.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: forcing 'fuse_wgrad_accumulation' to false for TE GroupedLinear, which is the primary modification in the changeset.

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


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.

…er GroupedLinear

Signed-off-by: realAsma <akuriparambi@nvidia.com>
@realAsma realAsma enabled auto-merge (squash) January 23, 2026 21:57
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.17%. Comparing base (b44c60a) to head (0229d2c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #814   +/-   ##
=======================================
  Coverage   74.17%   74.17%           
=======================================
  Files         192      192           
  Lines       19246    19246           
=======================================
  Hits        14276    14276           
  Misses       4970     4970           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@realAsma realAsma merged commit 04165ac into main Jan 23, 2026
36 checks passed
@realAsma realAsma deleted the asma/te_fuse_wgrad branch January 23, 2026 23: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.

2 participants