Skip to content

fix rtn bug#1622

Merged
wenhuach21 merged 2 commits intomainfrom
fix_mxint_bug
Mar 26, 2026
Merged

fix rtn bug#1622
wenhuach21 merged 2 commits intomainfrom
fix_mxint_bug

Conversation

@wenhuach21
Copy link
Contributor

@wenhuach21 wenhuach21 commented Mar 26, 2026

Description

Please briefly describe your main changes, the motivation.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

Copilot AI review requested due to automatic review settings March 26, 2026 07:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR appears to address an RTN (Round-To-Nearest) quantization bug and expand the set of supported quantization dtype prefixes.

Changes:

  • Add mx_int to the global SUPPORTED_DTYPES list.
  • Switch RTN quantization execution from torch.inference_mode() to torch.no_grad() (linked to issue #1620).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
auto_round/utils/common.py Expands declared supported dtype prefixes to include mx_int.
auto_round/compressors/base.py Changes RTN quantization decorator to torch.no_grad() to avoid an inference-mode-related issue.

@chensuyue
Copy link
Contributor

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chensuyue chensuyue added this to the 0.12.0 milestone Mar 26, 2026
@wenhuach21 wenhuach21 merged commit 891cf6e into main Mar 26, 2026
40 checks passed
@wenhuach21 wenhuach21 deleted the fix_mxint_bug branch March 26, 2026 09:12
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.

4 participants