Repository navigation
[dead code] Remove unused layer attributes - #4280
Merged
andrey-churkin merged 1 commit intoOct 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no remaining consumers of the deleted symbols, and the test-model changes preserve the graph behavior under test.
No open issues 🎉
What changed in this PR
Removes unused graph metadata and helpers left behind by the legacy PyTorch backend removal in #3832.
Changes:
- Deletes nine unused layer-attribute classes and four legacy graph helpers.
- Removes unused concatenation attributes from the constant-filtering test model and updates its caller.
- Corrects the PyTorch graph docstring to describe the existing
PT2OpLayerAttributescheck.
| File | Description |
|---|---|
tests/cross_fw/test_templates/models.py |
Removes the unused constructor argument and concatenation attributes. |
tests/common/quantization/test_passes.py |
Updates the test-model call and removes the obsolete import. |
src/nncf/torch/graph/graph.py |
Corrects the missing-input-edge docstring; no behavior change. |
src/nncf/common/graph/utils.py |
Removes four legacy helpers and their imports. |
src/nncf/common/graph/layer_attributes.py |
Removes nine unused attribute classes and the unused Any import. |
Review effort: Balanced
andrey-churkin
approved these changes
Oct 23, 2026
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
nncf.common.graph.layer_attributes:MultipleInputLayerAttributesMultipleOutputLayerAttributesGroupNormLayerAttributesReshapeLayerAttributesTransposeLayerAttributesPermuteLayerAttributesGetItemLayerAttributesPadLayerAttributesConvertDtypeLayerAttributesnncf.common.graph.utils:get_weight_shape_legacy,get_target_dim_for_compression_legacy,get_bias_shape_legacy,get_num_filters_legacy.PTNNCFGraph.get_nodes_with_missed_input_edgesto say that only nodes withPT2OpLayerAttributesare checked.concat_layer_attrargument from theNNCFGraphToTestConstantFilteringtest model; layer attributes are not used in the graph comparison.Reason for changes
Dead code left over after the legacy torch backend was removed (#3832).
Related tickets
Tests