Thrsu opened a new issue, #15271:
URL: https://github.com/apache/tvm/issues/15271

   From the [official ONNX Changelog 
document](https://github.com/onnx/onnx/blob/main/docs/Changelog.md#ReduceL2-18),
 we can see that in Opset 18 of ONNX, the ReduceL2 operator has been modified 
to accept the axis parameter from an input tensor instead of an attribute.
   The same issue exists for ReduceL1, ReduceL3, ReduceSumSquare, and 
ReduceLogSum operators.
   
   ### Actual behavior
   The crash message is as below:
   ```
   Traceback (most recent call last):
     ......
       irmod, params = relay.frontend.from_onnx(model, shape_dict, opset=18)
     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 3266, in _impl_v1
       out = AttrCvt("sum")(inputs, attr)
     File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/common.py", 
line 453, in __call__
       return get_relay_op(op_name)(*inputs, **new_attrs)
   TypeError: sum() got multiple values for argument 'axis'
   ```
   
   ### Environment
   
   TVM version: 0.13.dev0
   ONNX version: 1.14.0
   ONNX Opset version: 18
   
   ### Steps to reproduce
   You can download the [onnx 
model](https://drive.google.com/file/d/1F42GQK78WS8OTHNGSfDkWQcQE747CStC/view?usp=share_link)
 and use the script below to load it:
   ```
   import onnx
   import tvm
   import tvm.relay as relay
   
   shape_dict = {'data': [3, 2, 2], 'axes': [0]}
   irmod, params = relay.frontend.from_onnx(model, shape_dict, opset=18)
   ```
   
   ### Triage
   * frontend:onnx
   * needs-triage
   


-- 
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]

Reply via email to