-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PTQ][Torch][KQV self attention] Align FQ placement between OV and To…
…rch backend (#2166) ### Changes * "unbing" and "__matmul__" ops are added to torch patterns * Dropout removing pass is added to function `transform_to_inference_graph` * LayerNorm and GroupNorm metatypes are added to ignored metatypes in MinMax algorithm ### Reason for changes To align quantization placement between OV and Torch backends for the following models: * timm/crossvit_9_240 * timm/deit3_small_patch16_224 * timm/swin_base_patch4_window7_224 ### Related tickets 121647 ### Tests * test_metatypes_to_ignore for quantization propagation solver
- Loading branch information
1 parent
5336405
commit d879361
Showing
16 changed files
with
345 additions
and
40 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
19 changes: 19 additions & 0 deletions
19
tests/common/data/reference_graphs/passes/dropout_synthetic_model_after.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,19 @@ | ||
strict digraph { | ||
"0 /Input_1_0" [id=0, type=Input_1]; | ||
"1 /Split_1_0" [id=1, type=Split_1]; | ||
"5 /Output_1_0" [id=5, type=Output_1]; | ||
"6 /Output_2_1_0" [id=6, type=Output_2_1]; | ||
"7 /Output_2_2_0" [id=7, type=Output_2_2]; | ||
"8 /Output_2_3_0" [id=8, type=Output_2_3]; | ||
"9 /Output_3_0" [id=9, type=Output_3]; | ||
"10 /Output_2_4_0" [id=10, type=output]; | ||
"11 /Output_3_1_0" [id=11, type=output]; | ||
"0 /Input_1_0" -> "1 /Split_1_0"; | ||
"1 /Split_1_0" -> "5 /Output_1_0"; | ||
"1 /Split_1_0" -> "6 /Output_2_1_0"; | ||
"1 /Split_1_0" -> "7 /Output_2_2_0"; | ||
"1 /Split_1_0" -> "8 /Output_2_3_0"; | ||
"1 /Split_1_0" -> "9 /Output_3_0"; | ||
"1 /Split_1_0" -> "10 /Output_2_4_0"; | ||
"1 /Split_1_0" -> "11 /Output_3_1_0" [label="parallel_input_port_ids:[2, 3, 4, 5, 6, 7, 8, 9]"]; | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/common/data/reference_graphs/passes/dropout_synthetic_model_before.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,25 @@ | ||
strict digraph { | ||
"0 /Input_1_0" [id=0, type=Input_1]; | ||
"1 /Split_1_0" [id=1, type=Split_1]; | ||
"2 /Dropout_1_0" [id=2, type=Dropout_1]; | ||
"3 /Dropout_2_0" [id=3, type=Dropout_2]; | ||
"4 /Dropout_3_0" [id=4, type=Dropout_3]; | ||
"5 /Output_1_0" [id=5, type=Output_1]; | ||
"6 /Output_2_1_0" [id=6, type=Output_2_1]; | ||
"7 /Output_2_2_0" [id=7, type=Output_2_2]; | ||
"8 /Output_2_3_0" [id=8, type=Output_2_3]; | ||
"9 /Output_3_0" [id=9, type=Output_3]; | ||
"10 /Output_2_4_0" [id=10, type=output]; | ||
"11 /Output_3_1_0" [id=11, type=output]; | ||
"0 /Input_1_0" -> "1 /Split_1_0"; | ||
"1 /Split_1_0" -> "2 /Dropout_1_0"; | ||
"1 /Split_1_0" -> "3 /Dropout_2_0"; | ||
"1 /Split_1_0" -> "4 /Dropout_3_0"; | ||
"2 /Dropout_1_0" -> "5 /Output_1_0"; | ||
"3 /Dropout_2_0" -> "6 /Output_2_1_0"; | ||
"3 /Dropout_2_0" -> "7 /Output_2_2_0"; | ||
"3 /Dropout_2_0" -> "8 /Output_2_3_0"; | ||
"3 /Dropout_2_0" -> "10 /Output_2_4_0"; | ||
"4 /Dropout_3_0" -> "9 /Output_3_0"; | ||
"4 /Dropout_3_0" -> "11 /Output_3_1_0" [label="parallel_input_port_ids:[2, 3, 4, 5, 6, 7, 8, 9]"]; | ||
} |
Oops, something went wrong.