Skip to content

Commit 7c015dc

Browse files
committed
fix
1 parent 03fbeab commit 7c015dc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

onnx_diagnostic/export/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ def to_onnx(
187187
import onnx_ir as ir
188188
import onnx_ir.passes.common as common_passes
189189

190-
opset = target_opset if isinstance(target_opset, int) else target_opset[""]
190+
opset = (
191+
18
192+
if target_opset is None
193+
else (target_opset if isinstance(target_opset, int) else target_opset[""])
194+
)
191195

192196
irfunctions = [
193197
ir.from_proto(

0 commit comments

Comments
 (0)