Skip to content

[dead code] Remove unused layer attributes - #4280

Merged
andrey-churkin merged 1 commit into
openvinotoolkit:developfrom
AlexanderDokuchaev:ad/dead_code_la
Oct 23, 2026
Merged

andrey-churkin merged 1 commit into
openvinotoolkit:developfrom
AlexanderDokuchaev:ad/dead_code_la

Conversation

@AlexanderDokuchaev

@AlexanderDokuchaev AlexanderDokuchaev commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • Removed unused classes from nncf.common.graph.layer_attributes:
    • MultipleInputLayerAttributes
    • MultipleOutputLayerAttributes
    • GroupNormLayerAttributes
    • ReshapeLayerAttributes
    • TransposeLayerAttributes
    • PermuteLayerAttributes
    • GetItemLayerAttributes
    • PadLayerAttributes
    • ConvertDtypeLayerAttributes
  • Removed unused legacy helpers from nncf.common.graph.utils: get_weight_shape_legacy, get_target_dim_for_compression_legacy, get_bias_shape_legacy, get_num_filters_legacy.
  • Updated the docstring of PTNNCFGraph.get_nodes_with_missed_input_edges to say that only nodes with PT2OpLayerAttributes are checked.
  • Removed the concat_layer_attr argument from the NNCFGraphToTestConstantFiltering test 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

@AlexanderDokuchaev
AlexanderDokuchaev requested a review from a team as a code owner October 22, 2026 11:21
Copilot AI balanced review requested due to automatic review settings October 22, 2026 11:21
@github-actions github-actions Bot added the NNCF Common Pull request that updates NNCF Common label Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 PT2OpLayerAttributes check.
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

@AlexanderDokuchaev AlexanderDokuchaev changed the title Remove unused layer attributes [dead code] Remove unused layer attributes Oct 22, 2026
@andrey-churkin
andrey-churkin merged commit d1a7247 into openvinotoolkit:develop Oct 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NNCF Common Pull request that updates NNCF Common

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants