Repository navigation
[Torch] Drop all-zero float zero points of PT2E ops - #25112
Merged
roberto-laudani merged 1 commit intoOct 23, 2026
Merged
Conversation
roberto-laudani
force-pushed
the
users/roberto-laudani/qdq-float-zero-points
branch
from
October 23, 2026 08:26
aeca16b to
6f04d67
Compare
PT2E accepts float zero points, and exports store the zero points of symmetric weights as float zeros. The conversion passed them to `iree_linalg_ext.quantize_affine` / `dequantize_affine`, which require integer zero points, so the converted IR failed verification. All-zero float zero points are now dropped like a None zero point, and other float zero points are left for the Torch-to-Linalg lowering. The check reuses `isKnownZero` from the zero-point canonicalization, moved to the LinalgExt utils and extended to float splats. The per-channel, per-channel-group and per-token readers now read their zero points through one helper. Part of #24862. Signed-off-by: Roberto Laudani <[email protected]>
roberto-laudani
force-pushed
the
users/roberto-laudani/qdq-float-zero-points
branch
from
October 23, 2026 08:34
6f04d67 to
8c0bce6
Compare
roberto-laudani
marked this pull request as ready for review
October 23, 2026 08:38
roberto-laudani
requested review from
AGindinson,
egebeysel,
jschuhmacher,
rsuderman,
ziereis and
zjgarvey
as code owners
October 23, 2026 08:38
roberto-laudani
added a commit
that referenced
this pull request
Oct 23, 2026
Converts the typed torchao `quantize_affine` / `dequantize_affine` ops to `iree_linalg_ext.quantize_affine` / `dequantize_affine` during Torch input conversion, reusing the PT2E conversion. Float zero points are handled as for the PT2E ops. Depends on #25112, llvm/torch-mlir#4843 and a torch-mlir integrate. Part of #24862. Signed-off-by: Roberto Laudani <[email protected]>
ziereis
approved these changes
Oct 23, 2026
roberto-laudani
deleted the
users/roberto-laudani/qdq-float-zero-points
branch
October 23, 2026 10:05
8 tasks done
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.
PT2E accepts float zero points, and exports store those of symmetric weights as float zeros. The conversion passed them to
iree_linalg_ext.quantize_affine/dequantize_affine, which require integer zero points, so the converted IR failed verification:Nonezero point.isKnownZerofrom [LinalgExt] Canonicalize zero zero-points in affine QDQ ops #24905, moved fromLinalgExtOps.cppto the LinalgExt utils and extended to float splats.Part of #24862.