Fix Int8Tensor v2 to use float32 eps for better bfloat16 precision#3664
Merged
Fix Int8Tensor v2 to use float32 eps for better bfloat16 precision#3664
Conversation
Contributor
jcaip
commented
Jan 20, 2026
- Add explicit eps=torch.finfo(torch.float32).eps to Int8Tensor.from_hp
- Ensures consistent behavior with v1 AffineQuantizedTensor
- Fixes SQNR regression with bfloat16 inputs (bfloat16 eps=0.0078 vs float32 eps=1.19e-07)
- Add explicit eps=torch.finfo(torch.float32).eps to Int8Tensor.from_hp - Ensures consistent behavior with v1 AffineQuantizedTensor - Fixes SQNR regression with bfloat16 inputs (bfloat16 eps=0.0078 vs float32 eps=1.19e-07)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3664
Note: Links to docs will display an error until the docs builds have been completed. ❌ 8 New Failures, 1 Cancelled Job, 5 PendingAs of commit 9976fef with merge base 4b3ebc4 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
vkuzo
approved these changes
Jan 20, 2026
Collaborator
|
This is failing on both rocm and cuda. |
Contributor
Author
|
@amdfaa thanks for flagging, should be able to fix this in a bit. |
Merged
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.