Add test for constant folding in pt2e quant #3420
Merged
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.
Summary:
We want to remove pt2e quant code from pytorch and the constant folding test actually uses the pytorch pt2e quant APIs, so we will move the test to torchao instead, it's also going to just test the torchao version of constant fold: https://github.com/pytorch/ao/blob/main/torchao/quantization/pt2e/constant_fold.py
original test: https://github.com/pytorch/pytorch/blob/7a1e316115fc6996b3f2336822ba5d5f6179f0c3/test/export/test_passes.py#L1440
Test Plan:
python test/quantization/pt2e/test_quantize_pt2e.py -k test_constant_folding_pass
Reviewers:
Subscribers:
Tasks:
Tags: