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

[Common] Unified Scales for SDPA #3205

Merged

Conversation

anzr299
Copy link
Contributor

@anzr299 anzr299 commented Jan 22, 2025

Changes

Include SDPA metatype in scales unification map for all MinMax backends

Reason for changes

Scales were not being unified in quantizers inserted for such a subgraph:

x  y
\  |
 concat   Q   V
     |   /  /
      SDPA  

Tests

Template test was created at tests/cross_fw/test_templates/test_unified_scales.py
The template tests uses a synthetic SDPA model with a concat operation. Then, it uses the method _find_quantization_target_points of MinMaxQuantization algorithm to return the unified scale groups. These groups are then used for assertion.

@anzr299 anzr299 requested a review from a team as a code owner January 22, 2025 07:49
@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF ONNX Pull requests that updates NNCF ONNX NNCF PTQ Pull requests that updates NNCF PTQ labels Jan 22, 2025
@anzr299 anzr299 changed the title Common/sdpa unified scale [Common] Unified Scales for SDPA Jan 22, 2025
Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexanderDokuchaev AlexanderDokuchaev merged commit 874f16a into openvinotoolkit:develop Jan 22, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF ONNX Pull requests that updates NNCF ONNX NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PT Pull requests that updates NNCF PyTorch NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants