Skip to content
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

[FX] Support weight quantization for operations where weight_port_id != 1 #3334

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

siddhant-0707
Copy link

Changes

Updated the FX backend’s _get_input_scale_shape to use the FX insertion point shape and, when available, the actual weight tensor’s shape to compute the per‑channel scale shape.
Adjusted statistics collector in _get_stat_collector so that the reduction and aggregation axes are derived using the same channel axes as used for scale shape computation.

Related tickets

Issue #3206

Tests

All tests run successfully except:
test_smooth_quant.py::TestTorchSQAlgorithm::test_smooth_quant_algo[LinearMultiShapeModel-reference_values0] RuntimeError: shape '[1, 1, 2]' is invalid for input of size 1.

@siddhant-0707 siddhant-0707 requested a review from a team as a code owner March 8, 2025 02:18
@github-actions github-actions bot added the NNCF PTQ Pull requests that updates NNCF PTQ label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant