-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Bug Report
Describe the bug
#!/usr/bin/env python
import onnx
import onnx.parser
modeltxt = """
<
ir_version: 10,
opset_import: ["" : 17]
>
graph (float in0, float[2,7,8,1,3] in1, float[3,7] in2) => () {
out0, out1, out2 = LayerNormalization <epsilon: float = -841.058, stash_type: int = -940> (in0, in1, in2)
}
"""
model = onnx.parser.parse_model(modeltxt)
print("Parser: Passed")
onnx.checker.check_model(model, full_check=True)
print("Checker: Passed")
onnx.shape_inference.infer_shapes(model)
crashes with
Parser: Passed
[1] 187375 segmentation fault ./repro_bug.py
System information
- OS Platform and Distribution (. Linux Ubuntu 20.04): Linux Ubuntu 20.04
- ONNX version (e.g. 1.13): 1.16.1
- Python version: 3.10.12
Expected behavior
No crash, but an error that the model is invalid