disable torch compile for gguf with alg_ext - #1582
Merged
Merged
Conversation
for more information, see https://pre-commit.ci
Contributor
There was a problem hiding this comment.
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_oncetoinfo.
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. |
n1ck-guo
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please briefly describe your main changes, the motivation.
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting