Fix weight layout detection for MatMul with transpose in OpenVINO backend#3958
Fix weight layout detection for MatMul with transpose in OpenVINO backend#3958naraen-ram wants to merge 1 commit intoopenvinotoolkit:developfrom
Conversation
|
Hi @ljaljushkin , Just a follow-up on this PR. I’d appreciate a review whenever convenient. This contribution is part of my preparation for GSoC 2026, so getting feedback would help me move forward. Happy to make any requested changes. Thanks! |
|
Hi @naraen-ram, thank you for your contribution.
|
|
Hi @daniil-lyakhov, During my investigation of the issue, I reproduced a scenario where the transpose appears as a separate After revisiting the issue description again, I realized that the original task specifically refers to supporting I'll reproduce a model that produces Thanks! |
Fixes #3230
Description
Fix incorrect weight layout detection for MatMul layers when transpose is applied via OpenVINO graph rather than constant attributes.
Previously, constant_layer_attrs["transpose"] did not reflect graph-level transpose nodes, which could lead to incorrect channel axis detection during weight compression.
This change checks input_attributes metadata to correctly determine transpose state before computing layout.
Testing
Reproduced issue using custom Transpose → MatMul OpenVINO model.
Verified using:
pytest tests/openvino/native/quantization/test_weights_compression.py -k matmul
Result:
12 passed, 0 failed
Impact
Fixes weight compression correctness for: