Skip to content

Commit 544aa18

Browse files
committed
Add model checker
Signed-off-by: gcunhase <[email protected]>
1 parent 9bd1baa commit 544aa18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modelopt/onnx/trt_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ def load_onnx_model(
332332
save_onnx(onnx_model, ir_version_onnx_path, use_external_data_format)
333333
intermediate_generated_files.append(ir_version_onnx_path) # type: ignore[union-attr]
334334

335+
# Check that the model is valid
336+
onnx.checker.check_model(onnx_model)
337+
335338
return (
336339
onnx_model,
337340
has_custom_op,

0 commit comments

Comments
 (0)