Skip to content

disable torch compile for gguf with alg_ext - #1582

Merged
wenhuach21 merged 7 commits into
mainfrom
fix_gguf_compile
Mar 20, 2026
Merged

disable torch compile for gguf with alg_ext#1582
wenhuach21 merged 7 commits into
mainfrom
fix_gguf_compile

Conversation

@wenhuach21

@wenhuach21 wenhuach21 commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

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 20, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to improve compatibility between GGUF quantization paths and torch.compile, and adds a CUDA test intended to cover the GGUF + compile workflow.

Changes:

  • Add a new CUDA quantization test file targeting GGUF Q2_K_S with enable_torch_compile=True.
  • Adjust GGUF-related quantization math to use floating-point bases in exponentiation/pow operations (to better support compilation).
  • Downgrade the “algorithm extension” log from warning_once to info.

Reviewed changes

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

File Description
test/test_cuda/quantization/test_torch_compile.py Adds tests intended to validate GGUF Q2_K_S quantization/export under torch.compile.
auto_round/compressors/base.py Changes the log level/behavior when algorithm extension is enabled.
auto_round/alg_ext.py Tweaks GGUF-related quantization computations (float exponent base / torch.pow) and adds a commented Dynamo-disable hint.

Comment thread auto_round/alg_ext.py
Comment thread auto_round/compressors/base.py
Comment thread test/test_cuda/quantization/test_torch_compile.py
Comment thread test/test_cuda/quantization/test_torch_compile.py
@wenhuach21 wenhuach21 changed the title fix torch compile for gguf disable torch compile for gguf with alg_ext Mar 20, 2026
@wenhuach21
wenhuach21 merged commit fcb0d2d into main Mar 20, 2026
29 checks passed
@wenhuach21
wenhuach21 deleted the fix_gguf_compile branch March 20, 2026 08:37
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.

3 participants