-
Notifications
You must be signed in to change notification settings - Fork 240
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
[PT] Support custom modules in PTQ #2461
[PT] Support custom modules in PTQ #2461
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2461 +/- ##
============================================
- Coverage 91.16% 77.95% -13.21%
============================================
Files 494 493 -1
Lines 45416 45448 +32
============================================
- Hits 41403 35431 -5972
- Misses 4013 10017 +6004
... and 104 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
1ca7bee
to
bc61774
Compare
bc61774
to
1c06382
Compare
manual/job/post_training_quantization/345 - with replace_timm_custom_modules_with_torch_native |
manual/job/post_training_quantization/351/ |
81fc70e
to
3a74dce
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. Could you provide performance numbers for QAT tests?
@@ -206,7 +206,7 @@ def get_statistic_collector( | |||
|
|||
@staticmethod | |||
def get_weight_tensor_port_ids(node: NNCFNode) -> List[Optional[int]]: | |||
return [None] | |||
return node.metatype.weight_port_ids |
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.
As far as I understand, not all metatypes have a weight_port_ids
attribute, then [None]
should be returned, right?
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.
Yes, but weighted nodes have attribute, it's filtered before using get_weight_tensor_port_ids
nncf/nncf/quantization/algorithms/min_max/torch_backend.py
Lines 353 to 356 in fa1a4ce
def get_weight_nodes(nncf_graph: NNCFGraph) -> List[NNCFNode]: | |
return [ | |
node for node in nncf_graph.get_all_nodes() if isinstance(node.layer_attributes, WeightedLayerAttributes) | |
] |
136756e
to
3a74dce
Compare
|
### Changes Remove `replace_custom_modules` function ### Reason for changes After #2461, function is not actual.
Changes
PTModelExtractionWithFusedBiasCommand
toPTModelExtractionCommand
Reason for changes
Support models with custom modules.
Related tickets
129581