Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24875
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 618a0a9 with merge base 6411f1e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
This PR needs a
|
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues with the symmetric W8A32 quantization changes.
No open issues 🎉
What changed in this PR
This PR updates Cadence’s mixed W8A32 quantizer to use a symmetric signed 8-bit range of [-127, 127] for weights and biases while keeping activations in floating point.
Changes:
- Adds the symmetric quantization specification and applies it to linear, convolution, and GRU patterns.
- Adds annotation and range tests, removing the mixed quantizer’s annotation-test exclusion.
| File | Description |
|---|---|
backends/cadence/aot/tests/test_quantizer_ops.py |
Adds W8A32 annotation checks and a symmetric weight-range assertion. |
backends/cadence/aot/quantizer/quantizer.py |
Defines and applies the [-127, 127] configuration for mixed W8A32 quantization. |
Review effort: Balanced
dc7f125 to
078628c
Compare
Summary: # Summary This diff includes a symmetric 8 bit quantizer in ET. Differential Revision: D91777784
| self.assertEqual(annotation.input_qspec_map.keys(), expected.keys()) | ||
| for arg, qspec in expected.items(): | ||
| if isinstance(qspec, type): | ||
| self.assertIsInstance(annotation.input_qspec_map[arg], qspec) |
| def test_w8a32_weight_range_is_symmetric(self) -> None: | ||
| weight_qspec = qconfig_A32W8sym_127.weight | ||
| assert weight_qspec is not None | ||
| self.assertEqual((weight_qspec.quant_min, weight_qspec.quant_max), (-127, 127)) |
a406f9c to
68e63e3
Compare
Summary: # Summary This diff includes a symmetric 8 bit quantizer in ET. Differential Revision: D91777784
Summary: # Summary This diff includes a symmetric 8 bit quantizer in ET. Differential Revision: D91777784
68e63e3 to
618a0a9
Compare

Summary:
Summary
This diff includes a symmetric 8 bit quantizer in ET.
Differential Revision: D91777784