Skip to content

Commit a46ec67

Browse files
Add SDPA to scope overrides (#982)
1 parent 74d2161 commit a46ec67

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

examples/openvino/audio-classification/configs/wav2vec2-base-jpqd.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
"activations": {
5555
"{re}.*matmul_0": {
5656
"mode": "symmetric"
57+
},
58+
"{re}.*scaled_dot_product_attention_0": {
59+
"mode": "symmetric"
5760
}
5861
}
5962
},

examples/openvino/audio-classification/configs/wav2vec2-base-qat.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"activations": {
1717
"{re}.*matmul_0": {
1818
"mode": "symmetric"
19+
},
20+
"{re}.*scaled_dot_product_attention_0": {
21+
"mode": "symmetric"
1922
}
2023
}
2124
},

examples/openvino/image-classification/configs/swin-base-jpqd.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@
3232
"num_bn_adaptation_samples": 200
3333
}
3434
},
35-
"scope_overrides": {"activations": {"{re}.*matmul_0": {"mode": "symmetric"}}},
35+
"scope_overrides": {
36+
"activations": {
37+
"{re}.*matmul_0": {
38+
"mode": "symmetric"
39+
},
40+
"{re}.*scaled_dot_product_attention_0": {
41+
"mode": "symmetric"
42+
}
43+
}
44+
},
3645
"ignored_scopes": [
3746
"{re}.*__add___[0-1]",
3847
"{re}.*layer_norm_0",

optimum/intel/openvino/trainer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@
148148
"range": {"num_init_samples": 300, "type": "mean_min_max"},
149149
"batchnorm_adaptation": {"num_bn_adaptation_samples": 0},
150150
},
151-
"scope_overrides": {"activations": {"{re}.*matmul_0": {"mode": "symmetric"}}},
151+
"scope_overrides": {
152+
"activations": {
153+
"{re}.*matmul_0": {"mode": "symmetric"},
154+
"{re}.*scaled_dot_product_attention_0": {"mode": "symmetric"},
155+
}
156+
},
152157
"ignored_scopes": [
153158
"{re}.*Embedding.*",
154159
"{re}.*add___.*",

0 commit comments

Comments
 (0)