@@ -25,7 +25,7 @@ def remove_unused_nodes(self, model: onnx.ModelProto):
25
25
def test_remove_unused_nodes (self ):
26
26
model = onnx .parser .parse_model (
27
27
"""
28
- <ir_version: 7 , opset_import: [ "" : 17]>
28
+ <ir_version: 10 , opset_import: [ "" : 17]>
29
29
agraph (float[N] x) => (float[N] z) {
30
30
two = Constant <value_float=2.0> ()
31
31
four = Add(two, two)
@@ -40,7 +40,7 @@ def test_remove_unused_nodes(self):
40
40
def test_remove_unused_initializers (self ):
41
41
model = onnx .parser .parse_model (
42
42
"""
43
- <ir_version: 7 , opset_import: [ "" : 17]>
43
+ <ir_version: 10 , opset_import: [ "" : 17]>
44
44
agraph (float[N] x) => (float[N] z)
45
45
<float two = {2.0}> {
46
46
four = Add(two, two)
@@ -57,7 +57,7 @@ def test_remove_unused_initializers(self):
57
57
def test_partially_used_nodes (self ):
58
58
model = onnx .parser .parse_model (
59
59
"""
60
- <ir_version: 7 , opset_import: [ "" : 17]>
60
+ <ir_version: 10 , opset_import: [ "" : 17]>
61
61
agraph (float[N] x) => (float[M] z) {
62
62
w1, w2, w3 = Split (x)
63
63
z = Mul(w3, w3)
@@ -71,7 +71,7 @@ def test_partially_used_nodes(self):
71
71
def test_remove_unused_optional_outputs_maxpool (self ):
72
72
model = onnx .parser .parse_model (
73
73
"""
74
- <ir_version: 7 , opset_import: [ "" : 17]>
74
+ <ir_version: 10 , opset_import: [ "" : 17]>
75
75
agraph (float[1, 1, 5, 5] x) => (float[1, 1, 5, 5] z) {
76
76
z, indices = MaxPool <pads = [2, 2, 2, 2], kernel_shape = [5, 5]> (x)
77
77
}
@@ -88,7 +88,7 @@ def test_remove_unused_optional_outputs_maxpool(self):
88
88
def test_remove_unused_optional_outputs_dropout_in_function (self ):
89
89
model = onnx .parser .parse_model (
90
90
"""
91
- <ir_version: 7 , opset_import: [ "" : 17, "pkg.custom": 1]>
91
+ <ir_version: 10 , opset_import: [ "" : 17, "pkg.custom": 1]>
92
92
agraph (float[1, 1, 5, 5] x) => (float[1, 1, 5, 5] z)
93
93
{
94
94
z = pkg.custom.afunction (x)
@@ -113,7 +113,7 @@ def test_remove_unused_optional_outputs_dropout_in_function(self):
113
113
def test_remove_used_optional_outputs_maxpool (self ):
114
114
model = onnx .parser .parse_model (
115
115
"""
116
- <ir_version: 7 , opset_import: [ "" : 17]>
116
+ <ir_version: 10 , opset_import: [ "" : 17]>
117
117
agraph (float[1, 1, 5, 5] x) => (float[1, 1, 5, 5] y, float[1, 1, 5, 5] z) {
118
118
y, z = MaxPool <pads = [2, 2, 2, 2], kernel_shape = [5, 5]> (x)
119
119
}
@@ -130,7 +130,7 @@ def test_remove_used_optional_outputs_maxpool(self):
130
130
def test_remove_multiple_unused_optional_outputs_layernorm (self ):
131
131
model = onnx .parser .parse_model (
132
132
"""
133
- <ir_version: 7 , opset_import: [ "" : 17]>
133
+ <ir_version: 10 , opset_import: [ "" : 17]>
134
134
agraph (float[1, 3, 5, 5] x) => (float[1, 3, 5, 5] z) {
135
135
scale = Constant <value_ints=[3]> ()
136
136
B = Constant <value_ints=[3]> ()
@@ -149,7 +149,7 @@ def test_remove_multiple_unused_optional_outputs_layernorm(self):
149
149
def test_remove_trailing_unused_optional_outputs_layernorm (self ):
150
150
model = onnx .parser .parse_model (
151
151
"""
152
- <ir_version: 7 , opset_import: [ "" : 17]>
152
+ <ir_version: 10 , opset_import: [ "" : 17]>
153
153
agraph (float[1, 3, 5, 5] x) => (float[1, 3, 5, 5] z, float[1, 3, 5, 5] mean) {
154
154
scale = Constant <value_ints=[3]> ()
155
155
B = Constant <value_ints=[3]> ()
@@ -168,7 +168,7 @@ def test_remove_trailing_unused_optional_outputs_layernorm(self):
168
168
def test_avoid_remove_non_trailing_unused_optional_outputs_layernorm (self ):
169
169
model = onnx .parser .parse_model (
170
170
"""
171
- <ir_version: 7 , opset_import: [ "" : 17]>
171
+ <ir_version: 10 , opset_import: [ "" : 17]>
172
172
agraph (float[1, 3, 5, 5] x) => (float[1, 3, 5, 5] z, float[1, 3, 5, 5] InvStdDev) {
173
173
scale = Constant <value_ints=[3]> ()
174
174
B = Constant <value_ints=[3]> ()
@@ -187,7 +187,7 @@ def test_avoid_remove_non_trailing_unused_optional_outputs_layernorm(self):
187
187
def test_remove_trailing_unused_optional_outputs_batchnorm (self ):
188
188
model = onnx .parser .parse_model (
189
189
"""
190
- <ir_version: 7 , opset_import: [ "" : 17]>
190
+ <ir_version: 10 , opset_import: [ "" : 17]>
191
191
agraph (float[1, 3, 5, 5] x, float[3] scale, float[3] B) => (float[1, 3, 5, 5] z) {
192
192
z, mean_out, var_out = BatchNormalization <training_mode=1> (x, scale, B, mean, var)
193
193
}
@@ -204,7 +204,7 @@ def test_remove_trailing_unused_optional_outputs_batchnorm(self):
204
204
def test_avoid_remove_used_optional_outputs_batchnorm (self ):
205
205
model = onnx .parser .parse_model (
206
206
"""
207
- <ir_version: 7 , opset_import: [ "" : 17]>
207
+ <ir_version: 10 , opset_import: [ "" : 17]>
208
208
agraph (float[1, 3, 5, 5] x, float[3] scale, float[3] B) => (float[1, 3, 5, 5] z, float[3] mean_out, float[3] var_out) {
209
209
z, mean_out, var_out = BatchNormalization <training_mode=1> (x, scale, B, mean, var)
210
210
}
0 commit comments