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 2021/09/10 14:53:48 UTC

[GitHub] [tvm] syang-ng opened a new pull request #8983: [Bugfix] Fix other div zero errors also in rewrite_simplify

syang-ng opened a new pull request #8983:
URL: https://github.com/apache/tvm/pull/8983


   Similar to the bug reported in [PR 8961](https://github.com/apache/tvm/pull/8961), I find there are other three divisions in  [src/arith/rewrite_simplify.cc](https://github.com/apache/tvm/blob/main/src/arith/rewrite_simplify.cc) also don't check whether the divisor is 0.
   
   ## Bug Description
   
   Each line of  `rewrite_simplify` can trigger the segmentation fault error.
   
   ```python
   import tvm
   
   analyzer = tvm.arith.Analyzer()
   # mod
   analyzer.rewrite_simplify(tvm.tir.Mod(tvm.tir.Ramp(1,1,2), tvm.tir.Broadcast(0, 2)))
   # floordiv
   analyzer.rewrite_simplify(tvm.tir.FloorDiv(tvm.tir.Ramp(1,1,2), tvm.tir.Broadcast(0, 2)))
   # floormod
   analyzer.rewrite_simplify(tvm.tir.FloorMod(tvm.tir.Ramp(1,1,2), tvm.tir.Broadcast(0, 2)))
   ```
   
   
   To fix these errors, I add three zero checks in operator `mod`, `floordiv`, `floormod`. And I hope there will be no division by zero errors elsewhere :-)


-- 
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] vinx13 commented on pull request #8983: [Bugfix] Fix other div zero errors also in rewrite_simplify

Posted by GitBox <gi...@apache.org>.
vinx13 commented on pull request #8983:
URL: https://github.com/apache/tvm/pull/8983#issuecomment-920236818


   There are some flaky tests on CI, could you push again to retrigger CI?


-- 
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] jroesch merged pull request #8983: [Bugfix] Fix other div zero errors also in rewrite_simplify

Posted by GitBox <gi...@apache.org>.
jroesch merged pull request #8983:
URL: https://github.com/apache/tvm/pull/8983


   


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