jikechao opened a new issue, #14647: URL: https://github.com/apache/tvm/issues/14647
Compiling the [ONNX model](https://github.com/jikechao/onnx_models/blob/main/if_op.onnx) lead to a crash. The ONNX model only contains an `If` operator. The `If` operator has two attributes`else_branch` and `then_branch`. both attributes are subgraphs. ### Steps to reproduce 1. download the [if_op.onnx](https://github.com/jikechao/onnx_models/blob/main/if_op.onnx) 2. compile it using the command: ``` python -m tvm.driver.tvmc compile --target 'llvm' if_op.onnx ``` ### The ONNX model structure  #### The subgraph of `else_branch` and `then_branch` <figure class="half"> <img width="200" src= "https://user-images.githubusercontent.com/29506758/232416632-8b5866db-e46e-4064-9680-5d64344a5fc4.png"/><img width="200" src="https://user-images.githubusercontent.com/29506758/232416720-5f076110-9c8d-4330-af32-0b3b35be05fc.png" /> </figure> ### The StackTrace: ``` File "/workplace/software/tvm/tvm/python/tvm/driver/tvmc/frontends.py", line 169, in load return relay.frontend.from_onnx(model, shape=shape_dict, **kwargs) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7346, in from_onnx mod, params = g.from_onnx(graph, opset) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 6963, in from_onnx self._construct_nodes(graph) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7078, in _construct_nodes op = self._convert_operator(op_name, inputs, attr, self.opset) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7204, in _convert_operator sym = convert_map[op_name](inputs, attrs, self._params) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 4609, in _impl_v1 then_expr = then_graph.from_onnx(then_branch, graph_scope.opset, get_output_expr=True) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 6963, in from_onnx self._construct_nodes(graph) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7061, in _construct_nodes attr = self._parse_attr(node.attribute) File "/workplace/software/tvm/tvm/python/tvm/relay/frontend/onnx.py", line 7176, in _parse_attr raise ValueError("Cannot parse attribute: \n{}\n.".format(a)) ValueError: Cannot parse attribute: name: "type" . ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
