You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/04 15:56:23 UTC

[GitHub] [tvm] luyaor opened a new issue, #12305: [Bug] The Sum operation (with multi inputs) outputs wrong result

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

   ## Description
   
   When compiling following model, TVM will produce wrong result. The model(with ONNX as frontend) with error is as follows, check bug.onnx in [reproduce.zip](https://github.com/apache/tvm/files/9259136/reproduce.zip)
   
   The semantic of the model is to sum up input tensors with five times. For example, the first element in the input tensor is -0.7491791248321533, so the first element in output should be -0.7491791248321533 * 5 = -3.74, however, the element in the output is -11.986866.
   
   <img width="1020" alt="image" src="https://user-images.githubusercontent.com/7541296/182831586-cf464fff-2d42-465d-9f9a-b19041879f98.png">
   
   ## How to reproduce
   
   ### Expected behavior
   
   Output should be as follows:
   ```
    [array([[[[-3.7458956 ,  2.2319033 ,  4.721547  ]],
   
           [[-2.5541332 , -1.010938  , -1.2561022 ]],
   
           [[-2.432028  ,  2.1270378 , -2.2868755 ]]],
   
   
          [[[ 0.14414614, -3.7024972 ,  3.4796305 ]],
   
           [[ 1.8737267 ,  0.38758603,  1.1408547 ]],
   
           [[-2.7563024 ,  3.4405584 , -3.7759078 ]]]], dtype=float32)]
   ```
   ### Actual behavior
   
   This is the output of running model with TVM compiled.
   ```
   [[[[-11.986866     7.142091    15.108952  ]]
   
     [[ -8.173226    -3.2350018   -4.019527  ]]
   
     [[ -7.78249      6.806521    -7.3180013 ]]]
   
   
    [[[  0.46126765 -11.847991    11.134817  ]]
   
     [[  5.9959254    1.2402753    3.6507351 ]]
   
     [[ -8.820168    11.009787   -12.082905  ]]]]
   ```
   ### Environment
   
   Python3, with tvm, onnx, numpy, onnxruntime(optional)
   
   1. Download  [reproduce.zip](https://github.com/apache/tvm/files/9259136/reproduce.zip)
   
   2. Run `python check.py`.
   
   To check with the actual output, you could check with the commented code.
   
   


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


[GitHub] [tvm] vinx13 closed issue #12305: [Bug] The Sum operation (with multi inputs) outputs wrong result

Posted by GitBox <gi...@apache.org>.
vinx13 closed issue #12305: [Bug] The Sum operation (with multi inputs) outputs wrong result
URL: https://github.com/apache/tvm/issues/12305


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


[GitHub] [tvm] blackkker commented on issue #12305: [Bug] The Sum operation (with multi inputs) outputs wrong result

Posted by GitBox <gi...@apache.org>.
blackkker commented on issue #12305:
URL: https://github.com/apache/tvm/issues/12305#issuecomment-1205966252

   I reproduced it as you said and the output seems to be correct. 
   [output_compare](https://github.com/blackkker/Pic-host/blob/main/output.jpg)


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


[GitHub] [tvm] luyaor commented on issue #12305: [Bug] The Sum operation (with multi inputs) outputs wrong result

Posted by GitBox <gi...@apache.org>.
luyaor commented on issue #12305:
URL: https://github.com/apache/tvm/issues/12305#issuecomment-1205971060

   Ohh, my TVM version for testing is too old, I updated the TVM and the output is correct.


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