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

Adding matmul_integer_to_float16 onnx models (#16978) #18552

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions onnxruntime/test/testdata/matmul_integer_to_float16_int8.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
 :Ì
U
A
B
a_zero_point
b_zero_pointmatmul_output_int32MatMulInteger"MatMulInteger
.
a_scale
b_scale
multiplier mul_right"Mul
A
matmul_output_int32matmul_output_floatcast"Cast*
to
 
5
matmul_output_float

multiplierY
mul_bottom"MulDynamicQuantizeMatMul_fusionZ
A


M
KZ
B


K
NZ
a_scale



Z
b_scale


CZ
a_zero_point


Z
b_zero_point

Cb
Y



M
NB
Expand Down
49 changes: 49 additions & 0 deletions onnxruntime/test/testdata/matmul_integer_to_float16_int8_bias.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
 :Ä
9
A
Bmatmul_output_int32MatMulInteger"MatMulInteger
.
a_scale
b_scale
multiplier mul_right"Mul
A
matmul_output_int32matmul_output_floatcast"Cast*
to
 
E
matmul_output_float

multipliermul_bottom_output
mul_bottom"Mul
&
mul_bottom_output
biasYadd"AddDynamicQuantizeMatMul_fusionZ
A


M
KZ
B


K
NZ
a_scale



Z
b_scale


CZ
bias


Nb
Y



M
NB
Expand Down
51 changes: 51 additions & 0 deletions onnxruntime/test/testdata/matmul_integer_to_float16_int8_int8.onnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
 :Ì
U
A
B
a_zero_point
b_zero_pointmatmul_output_int32MatMulInteger"MatMulInteger
.
a_scale
b_scale
multiplier mul_right"Mul
A
matmul_output_int32matmul_output_floatcast"Cast*
to
 
5
matmul_output_float

multiplierY
mul_bottom"MulDynamicQuantizeMatMul_fusionZ
A


M
KZ
B


K
NZ
a_scale



Z
b_scale


CZ
a_zero_point


Z
b_zero_point

Cb
Y



M
NB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
 :Ä
9
A
Bmatmul_output_int32MatMulInteger"MatMulInteger
.
a_scale
b_scale
multiplier mul_right"Mul
A
matmul_output_int32matmul_output_floatcast"Cast*
to
 
E
matmul_output_float

multipliermul_bottom_output
mul_bottom"Mul
&
mul_bottom_output
biasYadd"AddDynamicQuantizeMatMul_fusionZ
A


M
KZ
B


K
NZ
a_scale



Z
b_scale


CZ
bias


Nb
Y



M
NB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
 :Ö
Q
input a_quantizeda_scalea_zpDynamicQuantizeLinear"DynamicQuantizeLinear
a
a_quantized
b_quantized_1
a_zp
b_zp_1matmul_output_int32_1MatMulInteger_1"MatMulInteger
4
a_scale
b_scale_1 multiplier_1 mul_right_1"Mul
G
matmul_output_int32_1matmul_output_float_1cast_1"Cast*
to 
F
matmul_output_float_1
multiplier_1 mul_output_1 mul_bottom_1"Mul
1
mul_output_1
bias_1output_1
bias_add_1"Add
a
a_quantized
b_quantized_2
a_zp
b_zp_2matmul_output_int32_2MatMulInteger_2"MatMulInteger
4
a_scale
b_scale_2 multiplier_2 mul_right_2"Mul
G
matmul_output_int32_2matmul_output_float_2cast_2"Cast*
to 
F
matmul_output_float_2
multiplier_2 mul_output_2 mul_bottom_2"Mul
1
mul_output_2
bias_2output_2
bias_add_2"Add
a
a_quantized
b_quantized_3
a_zp
b_zp_3matmul_output_int32_3MatMulInteger_3"MatMulInteger
4
a_scale
b_scale_3 multiplier_3 mul_right_3"Mul
G
matmul_output_int32_3matmul_output_float_3cast_3"Cast*
to 
B
matmul_output_float_3
multiplier_3output_3 mul_bottom_3"MulMatMulIntegerToFloat_fusion**Bb_quantized_1**€Bb_zp_1*
*³~B b_scale_1**Bb_quantized_3**€Bb_zp_3*
*³~B b_scale_3*
* €€€ˆ€ŠBbias_1**
*€x€€€„€ˆ€Š€Œ€Ž€€‘Bbias_2Z
input



Z
b_quantized_2


Z
b_zp_2


Z
b_scale_2



b
output_1



b
output_2



b
output_3



B
Expand Down
Loading