Skip to content

Commit

Permalink
Fix IR version for merged ONNX decoders (#1780)
Browse files Browse the repository at this point in the history
fix IR version for merged decoders
  • Loading branch information
fxmarty authored Mar 27, 2024
1 parent 548d0ac commit dedb852
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion optimum/onnx/graph_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ def merge_decoders(
opset_imports.append(opset_import)
opset_domains.add(opset_import.domain)

merged_model = onnx.helper.make_model(merged_graph, producer_name=producer_name, opset_imports=opset_imports)
# TODO: update IR version in the future.
merged_model = onnx.helper.make_model_gen_version(
merged_graph, producer_name=producer_name, opset_imports=opset_imports, ir_version=9
)

check_and_save_model(merged_model, save_path=save_path)

Expand Down

0 comments on commit dedb852

Please sign in to comment.