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/11/01 08:44:01 UTC

[GitHub] [tvm] syang-ng edited a comment on issue #9407: [Bug] Crash if we use the same variable in LetStmt and Select Expr

syang-ng edited a comment on issue #9407:
URL: https://github.com/apache/tvm/issues/9407#issuecomment-956041722


   Similarly, the following example can also trigger a crash.
   
   ```python
   import tvm
   from tvm import tir
   
   var = tir.Var('var', 'int32')
   false_value = tir.Cast('int32', tir.acosh(tir.Cast('float32', var)))
   value = tir.Select(var > 0, tir.const(0), false_value)
   let_stmt = tir.LetStmt(var, value, tir.Evaluate(var))
   f = tir.PrimFunc({}, let_stmt)
   tvm.build(f)
   ```
   
   ```
   primfn() -> () {
     let var: int32 = select((var > 0), 0, cast(int32, @tir.acosh(cast(float32, var), dtype=float32)))
     var
   }
   ```
   
   Different from the last example, this bug crashes in `PrimExpr RewriteSimplifier::Impl::VisitExpr_(const LTNode* op)`
   
   ![image](https://user-images.githubusercontent.com/25731241/139645042-0759d9db-255a-461b-9516-e83d268d443e.png)
   
   


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