-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Torch] Drop PTQuantizerInsertionCommand
#2584
[Torch] Drop PTQuantizerInsertionCommand
#2584
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2584 +/- ##
===========================================
- Coverage 91.16% 84.90% -6.26%
===========================================
Files 494 494
Lines 45350 45368 +18
===========================================
- Hits 41342 38521 -2821
- Misses 4008 6847 +2839
... and 59 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
1281a0d
to
317f263
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d3c03b0
to
9ec57fd
Compare
On top of #2584 ### Changes `NNCFNetwork.transformation_layout` method is introduced ### Reason for changes To make it possible to collect applied transformation commands from a modified `NNCFNetwork` ### Related tickets 129586 ### Tests TestGetAppliedModificationCommands
On top of #2584 #2595 ### Changes * `serialize_transformations` and `load_transformations` functions are introduced: `serialize_transformations` could serialize `PTTransformationLayout` to a dict which could be serialized by json; serialized transformation could be recovered by the `load_transformations` function. * `StatefullTorchModuleInterface` is introduced to make it possible to serialize all compression modules for quantization, sparisification, weights compression and pruning algorithms * Quantizers are created with scale shape specified in the quantization spec ### Reason for changes * To make it possible to serialize/deserialize PT nncf transformations * To make it possible to serialize/deserialize compression modules which are the part of each transformation * To align scales shapes after `nncf.quantize` and quantizes initialization ### Related tickets 129586 ### Tests * tests/torch/test_serialization.py * tests/torch/test_serialization.py * tests/torch/test_serialization.py
Preparation for #2531
Changes
PTQuantizerInsertionCommand
is removed and replaced with create_quantizer_insertion_command functionSharedFNInsertionCommand
updates with one new attribute: compression_module_typeExtraOpCallHook
doesn't require context in constructor anymoreapply_quantizers_insertion_commands_transformation
toapply_insertion_transformation
Reason for changes
PTQuantizerInsertionCommand
bySharedFNInsertionCommand
ExtraOpCallHook
outside of thePTModelTransformer
Related tickets
2531
Tests
1)
test_quantizer_insertion_transformation
is updated2) -
3)
test_shared_fn_insertion_point
is updated4)
test_pt_insertion_command
is introduced