Skip to content

Shape Inference crash on Gemm #6185

@mgehre-amd

Description

@mgehre-amd

Bug Report

Describe the bug

import onnx
import onnx.parser

model = """
<
   ir_version: 10,
   opset_import: ["" : 6]
>
graph (double[2,1] in0, double in1, double[2] in2) => () {
   out0 = Gemm <alpha: float = 1, beta: float = -693.752, broadcast: int = -436, transB: int = 823> (in0, in1, in2)
}
"""

onnx.shape_inference.infer_shapes(onnx.parser.parse_model(model))

crashes with a segmentation fault.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions