Skip to content

Commit e044c63

Browse files
committed
[Trunc] set onnx_opset_version=1 for v1 instance
1 parent 82ed368 commit e044c63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/qonnx/custom_op/general/trunc.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ class Trunc_v1(CustomOp):
158158
values.
159159
"""
160160

161+
def __init__(self, onnx_node, onnx_opset_version=get_preferred_qonnx_opset()):
162+
super().__init__(onnx_node, onnx_opset_version)
163+
# override any specified opset version, this instance is v1
164+
self.onnx_opset_version = 1
165+
161166
def get_nodeattr_types(self):
162167
return {
163168
# The rounding mode, which is used for the trunc function

0 commit comments

Comments
 (0)