-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OV] Support for ScaledDotProductAttention operation (#2268)
### Changes - Introduced `OVScaledDotProductAttentionMetatype` - target_input_ports attribute in `OperatorMetatype` - Implement handling OVScaledDotProductAttentionMetatype into `QuantizerPropagationSolver` ### Reason for changes Support quantization of ScaledDotProductAttention operation from OpenVINO opset13 ### Related tickets 124573 ### Tests test_scaled_dot_product_attention_placement --------- Co-authored-by: Nikita Malinin <[email protected]>
- Loading branch information
Showing
16 changed files
with
149 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
33 changes: 33 additions & 0 deletions
33
...s/openvino/native/data/2023.3/reference_graphs/quantized/scaled_dot_product_attention.dot
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
strict digraph { | ||
"0 Input_1" [id=0, type=Parameter]; | ||
"1 Input_2" [id=1, type=Parameter]; | ||
"2 Input_3" [id=2, type=Parameter]; | ||
"3 Input_4" [id=3, type=Parameter]; | ||
"4 Input_1/fq_output_0" [id=4, type=FakeQuantize]; | ||
"5 Input_2/fq_output_0" [id=5, type=FakeQuantize]; | ||
"6 ScaledDotProductAttention_5" [id=6, type=ScaledDotProductAttention]; | ||
"7 Result" [id=7, type=Result]; | ||
"8 Constant_2553" [id=8, type=Constant]; | ||
"9 Constant_2552" [id=9, type=Constant]; | ||
"10 Constant_2551" [id=10, type=Constant]; | ||
"11 Constant_2550" [id=11, type=Constant]; | ||
"12 Constant_2548" [id=12, type=Constant]; | ||
"13 Constant_2547" [id=13, type=Constant]; | ||
"14 Constant_2546" [id=14, type=Constant]; | ||
"15 Constant_2545" [id=15, type=Constant]; | ||
"0 Input_1" -> "4 Input_1/fq_output_0" [label="[1, 1, 1, 64]", style=solid]; | ||
"1 Input_2" -> "5 Input_2/fq_output_0" [label="[1, 1, 1, 64]", style=solid]; | ||
"2 Input_3" -> "6 ScaledDotProductAttention_5" [label="[1, 1, 1, 64]", style=solid]; | ||
"3 Input_4" -> "6 ScaledDotProductAttention_5" [label="[1, 1, 1, 1]", style=solid]; | ||
"4 Input_1/fq_output_0" -> "6 ScaledDotProductAttention_5" [label="[1, 1, 1, 64]", style=solid]; | ||
"5 Input_2/fq_output_0" -> "6 ScaledDotProductAttention_5" [label="[1, 1, 1, 64]", style=solid]; | ||
"6 ScaledDotProductAttention_5" -> "7 Result" [label="[1, 1, 1, 64]", style=solid]; | ||
"8 Constant_2553" -> "5 Input_2/fq_output_0" [label="[]", style=solid]; | ||
"9 Constant_2552" -> "5 Input_2/fq_output_0" [label="[]", style=solid]; | ||
"10 Constant_2551" -> "5 Input_2/fq_output_0" [label="[]", style=solid]; | ||
"11 Constant_2550" -> "5 Input_2/fq_output_0" [label="[]", style=solid]; | ||
"12 Constant_2548" -> "4 Input_1/fq_output_0" [label="[]", style=solid]; | ||
"13 Constant_2547" -> "4 Input_1/fq_output_0" [label="[]", style=solid]; | ||
"14 Constant_2546" -> "4 Input_1/fq_output_0" [label="[]", style=solid]; | ||
"15 Constant_2545" -> "4 Input_1/fq_output_0" [label="[]", style=solid]; | ||
} |
This file contains 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
This file contains 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