0x00-pl opened a new issue, #14435:
URL: https://github.com/apache/tvm/issues/14435
when i use tvm to import onnx model, i found ReduseSum is not got currect
graph in opset>=12.
and i found this code in tvm source:
```
if len(inputs) == 2:
if isinstance(inputs[1], _expr.Constant):
# Get axis and unpack scalar
constant_axis = int(inputs[1].data.numpy()[0])
return cls.run_calculation([inputs[0]], constant_axis,
attr.get("keepdims", True))
```
https://github.com/apache/tvm/blob/main/python/tvm/relay/frontend/onnx.py#L3164
this is not work when `inputs[1].data.numpy()` has mutiple items. ant not
assert it.
go more deep on test code, that i found this part of code is misstesting:
```
def test_all_reduce_funcs(target, dev):
"""test_all_reduce_funcs"""
...
verify_with_ort_with_inputs(
model,
[data],
[outshape],
opset=11, # FIXME. this is not testing
https://github.com/apache/tvm/blob/main/python/tvm/relay/frontend/onnx.py#L3136-L3174
target=target,
dev=dev,
rtol=1e-4,
atol=1e-4,
)
```
https://github.com/apache/tvm/blob/main/tests/python/frontend/onnx/test_forward.py#L2205
--
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]