Skip to content

Commit d99712e

Browse files
author
Kaiyu Shi
committed
Simplify to from_onnx_text
1 parent 0c1cee2 commit d99712e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

onnxscript/rewriter/fuse_hardswish_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_hardsigmoid_fusion(self):
6666
y = Div(clipped, six)
6767
}
6868
"""
69-
model = ir.from_proto(onnx.parser.parse_model(model_text))
69+
model = ir.from_onnx_text(model_text)
7070
self.run_test(model, ["HardSigmoid"])
7171

7272
def test_hardswish_fusion(self):
@@ -82,7 +82,7 @@ def test_hardswish_fusion(self):
8282
y = Div(mul_x, six)
8383
}
8484
"""
85-
model = ir.from_proto(onnx.parser.parse_model(model_text))
85+
model = ir.from_onnx_text(model_text)
8686
self.run_test(model, ["HardSwish"])
8787

8888
def test_hardswish_fusion_mul_last(self):
@@ -98,7 +98,7 @@ def test_hardswish_fusion_mul_last(self):
9898
y = Mul(div_x, x)
9999
}
100100
"""
101-
model = ir.from_proto(onnx.parser.parse_model(model_text))
101+
model = ir.from_onnx_text(model_text)
102102
self.run_test(model, ["HardSwish"])
103103

104104
def test_hardswish_fusion_from_sigmoid(self):
@@ -109,7 +109,7 @@ def test_hardswish_fusion_from_sigmoid(self):
109109
y = Mul(hardsigmoid_out, x)
110110
}
111111
"""
112-
model = ir.from_proto(onnx.parser.parse_model(model_text))
112+
model = ir.from_onnx_text(model_text)
113113
self.run_test(model, ["HardSwish"])
114114

115115

0 commit comments

Comments
 (0)