Skip to content

Conversation

jerryzh168
Copy link
Contributor

Summary:
This is to avoid div by 0 in quantize

Test Plan:
python test/quantization/test_quant_primitives.py -k test_choose_qparams_tensor_asym_eps

Reviewers:

Subscribers:

Tasks:

Tags:

@facebook-github-bot facebook-github-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 May 1, 2024
@jerryzh168 jerryzh168 requested review from vkuzo and cpuhrsch May 1, 2024 22:07
Summary:
This is to avoid div by 0 in quantize

Test Plan:
python test/quantization/test_quant_primitives.py -k test_choose_qparams_tensor_asym_eps

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just see what happens if eps is less than machine epsilon and if clamp throws a warning etc.

Otherwise we might want to add a warning/exception if user passes an eps below scalar machine epsilon (else we divide by zero later).

@msaroufim msaroufim merged commit ec9d9d8 into pytorch:main May 3, 2024
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
* add init file, as per Jez

* split fused weights
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants