[FX][Tests] Use smaller swin transformer to speed up pre-commit#4082
Open
daniil-lyakhov wants to merge 1 commit into
Open
[FX][Tests] Use smaller swin transformer to speed up pre-commit#4082daniil-lyakhov wants to merge 1 commit into
daniil-lyakhov wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the FX graph tests’ swin_v2_t torchvision model with a smaller synthetic Swin V2 fixture to reduce pre-commit runtime.
Changes:
- Adds a custom Swin V2 test model fixture.
- Switches FX graph and quantization test cases to the new Swin fixture.
- Adds regenerated non-dynamic graph/metatype references for the new model and removes the old Swin metatype reference.
Reviewed changes
Copilot reviewed 7 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tests/torch/test_models/synthetic.py |
Adds the new Swin V2 synthetic test fixture. |
tests/torch/fx/test_models.py |
Replaces swin_v2_t test cases with the new fixture and updates expected Q/DQ counts. |
tests/torch/data/fx/swin_v2_single_block.dot |
Adds reference FX graph for the new fixture. |
tests/torch/data/fx/reference_metatypes/swin_v2_t.json |
Removes old Swin V2 Tiny metatype reference. |
tests/torch/data/fx/reference_metatypes/swin_v2_single_block.json |
Adds metatype reference for the new fixture. |
tests/torch/data/fx/quantized/swin_v2_single_block.dot |
Adds non-compressed quantized reference graph. |
tests/torch/data/fx/post_quantization_compressed/swin_v2_single_block.dot |
Adds compressed quantized reference graph. |
39e37a9 to
17ccb83
Compare
Collaborator
vs Is it better but still too slow, all tests runs for 461s |
Collaborator
Author
@AlexanderDokuchaev, what would you suggest? Let's remove swin tests all together, otherwise the current version is minimal viable to chech the architecture |
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.
Changes
swin_v2_t is replaced with smaller version for the graph tests - the same graph but with only 2 blocks
Reason for changes
To speed up pre-commit tests as swin_2_t took the most time (~1 min faster)
Related tickets
178804
Tests