You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "0x00-pl (via GitHub)" <gi...@apache.org> on 2023/03/30 03:26:23 UTC

[GitHub] [tvm] 0x00-pl opened a new issue, #14435: [Bug] Import ReduseSum From Onnx is not working when opset>=12 and len(axis)>1

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: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Import ReduseSum From Onnx is not working when opset>=12 and len(axis)>1 [tvm]

Posted by "0x00-pl (via GitHub)" <gi...@apache.org>.
0x00-pl closed issue #14435: [Bug] Import ReduseSum From Onnx is not working when opset>=12 and len(axis)>1 
URL: https://github.com/apache/tvm/issues/14435


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org