Skip to content

Commit caa770a

Browse files
committed
benchdnn: inputs: graph: fix test cases related to int8/f8 add
src1 with different data types cannot be fused.
1 parent 607a318 commit caa770a

5 files changed

+112
-380
lines changed

tests/benchdnn/inputs/graph/pattern/f8/f8_conv_add_add_fusion.json

+64-124
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"version": "3.6.0",
2+
"version": "3.8.0",
33
"engine_kind": "cpu",
44
"fpmath_mode": "strict",
5+
"fpmath_mode_apply_to_int": "false",
56
"input_ports": [
67
0,
78
1,
89
2,
9-
3
10+
10305
1011
],
1112
"output_ports": [
1213
14512
@@ -134,128 +135,6 @@
134135
}
135136
]
136137
},
137-
{
138-
"id": 8209,
139-
"name": "DEQUANTIZE_4",
140-
"kind": "Dequantize",
141-
"attrs": {
142-
"axis": {
143-
"type": "s64",
144-
"value": 1
145-
},
146-
"qtype": {
147-
"type": "string",
148-
"value": "per_tensor"
149-
},
150-
"scales": {
151-
"type": "f32[]",
152-
"value": [
153-
1
154-
]
155-
}
156-
},
157-
"inputs": [
158-
{
159-
"id": 2,
160-
"dtype": "f8_e5m2",
161-
"shape": [
162-
1,
163-
1,
164-
1,
165-
1
166-
],
167-
"stride": [
168-
1,
169-
1,
170-
1,
171-
1
172-
],
173-
"layout_type": "strided",
174-
"property_type": "undef"
175-
}
176-
],
177-
"outputs": [
178-
{
179-
"id": 6209,
180-
"dtype": "f32",
181-
"shape": [
182-
1,
183-
1,
184-
1,
185-
1
186-
],
187-
"stride": [
188-
1,
189-
1,
190-
1,
191-
1
192-
],
193-
"layout_type": "strided",
194-
"property_type": "undef"
195-
}
196-
]
197-
},
198-
{
199-
"id": 12305,
200-
"name": "DEQUANTIZE_6",
201-
"kind": "Dequantize",
202-
"attrs": {
203-
"axis": {
204-
"type": "s64",
205-
"value": 1
206-
},
207-
"qtype": {
208-
"type": "string",
209-
"value": "per_tensor"
210-
},
211-
"scales": {
212-
"type": "f32[]",
213-
"value": [
214-
1
215-
]
216-
}
217-
},
218-
"inputs": [
219-
{
220-
"id": 3,
221-
"dtype": "f8_e5m2",
222-
"shape": [
223-
1,
224-
1,
225-
1,
226-
1
227-
],
228-
"stride": [
229-
1,
230-
1,
231-
1,
232-
1
233-
],
234-
"layout_type": "strided",
235-
"property_type": "undef"
236-
}
237-
],
238-
"outputs": [
239-
{
240-
"id": 10305,
241-
"dtype": "f32",
242-
"shape": [
243-
1,
244-
1,
245-
1,
246-
1
247-
],
248-
"stride": [
249-
1,
250-
1,
251-
1,
252-
1
253-
],
254-
"layout_type": "strided",
255-
"property_type": "undef"
256-
}
257-
]
258-
},
259138
{
260139
"id": 4,
261140
"name": "CONV_0",
@@ -365,6 +244,67 @@
365244
}
366245
]
367246
},
247+
{
248+
"id": 8209,
249+
"name": "DEQUANTIZE_4",
250+
"kind": "Dequantize",
251+
"attrs": {
252+
"axis": {
253+
"type": "s64",
254+
"value": 1
255+
},
256+
"qtype": {
257+
"type": "string",
258+
"value": "per_tensor"
259+
},
260+
"scales": {
261+
"type": "f32[]",
262+
"value": [
263+
1
264+
]
265+
}
266+
},
267+
"inputs": [
268+
{
269+
"id": 2,
270+
"dtype": "f8_e5m2",
271+
"shape": [
272+
1,
273+
1,
274+
1,
275+
1
276+
],
277+
"stride": [
278+
1,
279+
1,
280+
1,
281+
1
282+
],
283+
"layout_type": "strided",
284+
"property_type": "undef"
285+
}
286+
],
287+
"outputs": [
288+
{
289+
"id": 6209,
290+
"dtype": "f32",
291+
"shape": [
292+
1,
293+
1,
294+
1,
295+
1
296+
],
297+
"stride": [
298+
1,
299+
1,
300+
1,
301+
1
302+
],
303+
"layout_type": "strided",
304+
"property_type": "undef"
305+
}
306+
]
307+
},
368308
{
369309
"id": 6145,
370310
"name": "BINARY_3",

tests/benchdnn/inputs/graph/pattern/harness_int8_all

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
--reset --case=pattern/int8/int8_bf16_matmul_sum_add_mul_relu.json
1515
--reset --attr-fpmath=strict:false,bf16:false,tf32:false --case=pattern/int8/int8_avgpool_reshape_fusion.json
1616
--reset --case=pattern/int8/int8_avgpool_transpose_fusion.json
17-
--reset --expected-n-partitions=0 --case=pattern/int8/int8_bf16_conv_add_relu_mul.json
17+
--reset --case=pattern/int8/int8_bf16_conv_add_relu_mul.json
1818
--reset --case=pattern/int8/int8_bf16_matmul_tc_add_quant_fusion.json
1919
--reset --case=pattern/int8/int8_bf16_conv_binary_add_fusion_2.json
2020

@@ -23,7 +23,7 @@
2323
--reset --in-shapes=0:1x2048x14x14+1:2048x64x3x3+2:2048 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:1x1*pads_end:1x1*groups:32 --case=pattern/int8/int8_conv_bias_mish_fusion.json
2424
--reset --in-shapes=0:1x2048x14x14+1:2048x64x3x3+2:2048 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:1x1*pads_end:1x1*groups:32 --case=pattern/int8/int8_conv_bias_relu_fusion_2.json
2525
--reset --in-shapes=0:1x2048x14x14+1:2048x64x3x3+2:2048 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:1x1*pads_end:1x1*groups:32 --case=pattern/int8/int8_conv_bias_relu_fusion_3.json
26-
--reset --expected-n-partitions=0 --in-shapes=0:50x64x56x56+1:64x64x1x1+2:1x1x1x1+3:1x1x1x1 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:0x0*pads_end:0x0*groups:1 --case=pattern/int8/int8_conv_add_add_fusion.json
26+
--reset --in-shapes=0:50x64x56x56+1:64x64x1x1+2:1x1x1x1+3:1x1x1x1 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:0x0*pads_end:0x0*groups:1 --case=pattern/int8/int8_conv_add_add_fusion.json
2727
--reset --expected-n-partitions=0 --op-attrs=8209:zps:1 --case=pattern/int8/int8_conv_add_add_fusion.json
2828
--reset --in-shapes=0:50x64x56x56+1:64x64x1x1+2:1x1x1x1+3:1x64x1x1 --op-attrs=4:strides:1x1*dilations:1x1*pads_begin:0x0*pads_end:0x0*groups:1 --case=pattern/int8/int8_conv_add_mul_fusion.json
2929
--reset --expected-n-partitions=0 --op-attrs=8209:zps:2 --case=pattern/int8/int8_conv_add_mul_fusion.json
@@ -46,7 +46,7 @@
4646
# matmul
4747
--reset --in-shapes=0:16x256+1:256x1+2:1x1+3:1x1 --case=pattern/int8/int8_matmul_add_mul_fusion.json
4848
--reset --expected-n-partitions=0 --op-attrs=8209:zps:3 --case=pattern/int8/int8_matmul_add_mul_fusion.json
49-
--reset --expected-n-partitions=0 --in-shapes=0:16x256+1:256x1+2:1x1+3:1x1+4:1x1 --case=pattern/int8/int8_matmul_mul_add_mul_fusion.json
49+
--reset --in-shapes=0:16x256+1:256x1+2:1x1+3:1x1+4:1x1 --case=pattern/int8/int8_matmul_mul_add_mul_fusion.json
5050
--reset --in-shapes=0:16x256+1:256x1+2:1x1 --case=pattern/int8/int8_matmul_logistic_fusion.json
5151
--reset --in-shapes=0:16x1024+1:1024x1024+2:1x1024 --op-attrs=4113:scales:2 --case=pattern/int8/int8_matmul_logistic_fusion.json
5252
--reset --in-shapes=0:16x1024+1:1024x512+2:1x512 --op-attrs=4113:scales:2 --case=pattern/int8/int8_matmul_logistic_fusion.json

0 commit comments

Comments
 (0)