Skip to content

Fix Int8Tensor v2 to use float32 eps for better bfloat16 precision#3664

Merged
jcaip merged 1 commit intomainfrom
jcaip/fix-int8-eps
Jan 20, 2026
Merged

Fix Int8Tensor v2 to use float32 eps for better bfloat16 precision#3664
jcaip merged 1 commit intomainfrom
jcaip/fix-int8-eps

Conversation

@jcaip
Copy link
Copy Markdown
Contributor

@jcaip 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)
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 20, 2026

🔗 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 Pending

As of commit 9976fef with merge base 4b3ebc4 (image):

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 20, 2026
@jcaip jcaip added the topic: bug fix Use this tag for PRs that fix bugs label Jan 20, 2026
@jcaip jcaip merged commit 3834780 into main Jan 20, 2026
7 of 23 checks passed
@amdfaa
Copy link
Copy Markdown
Collaborator

amdfaa commented Jan 21, 2026

@jcaip
Copy link
Copy Markdown
Contributor Author

jcaip commented Jan 21, 2026

@amdfaa thanks for flagging, should be able to fix this in a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: bug fix Use this tag for PRs that fix bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants