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/05/06 20:30:38 UTC

[GitHub] [tvm] vinx13 opened a new pull request, #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

vinx13 opened a new pull request, #11234:
URL: https://github.com/apache/tvm/pull/11234

   This PR fixed `compute_at` / `reverse_compute_at` when block access regions contain constants (e.g. `A[0, vi, vj]`). 
   Background:
   https://github.com/apache/tvm/pull/11187 added additional simplification when creating prim func from TE. This may result in block var with constant binding values simplified.
   
   cc @junrushao1994 @spectrometerHBH @zxybazh @shingjan 


-- 
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] Hzfengsy merged pull request #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

Posted by GitBox <gi...@apache.org>.
Hzfengsy merged PR #11234:
URL: https://github.com/apache/tvm/pull/11234


-- 
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 #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

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

   CUDA will call `cache_write` to introduce a cache block first, so the block used for `reverse_compute_at` is different, and the bindings we are dealing with might also be different 


-- 
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] wrongtest commented on pull request #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

Posted by GitBox <gi...@apache.org>.
wrongtest commented on PR #11234:
URL: https://github.com/apache/tvm/pull/11234#issuecomment-1120111692

   > Reading the cryptic error message, it seems that the `IntervalSet` sometimes is used to represent `handle` vs `int`, so it cans `CanProveEqual` - a bit weird to me, but definitely fixable with more guards
   
   In `IntervalSet`, positive and negative infinity are two special values with type `handle`, and `intset.min()` and `intset.max()` should check whether be infinity, can not directly assume they are of integer type.


-- 
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] junrushao1994 commented on pull request #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11234:
URL: https://github.com/apache/tvm/pull/11234#issuecomment-1120119963

   That makes a lot of sense @wrong


-- 
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] junrushao1994 commented on pull request #11234: [TIR] Fix reverse_compute_at for trivial region with trivial block var

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #11234:
URL: https://github.com/apache/tvm/pull/11234#issuecomment-1120091444

   Reading the cryptic error message, it seems that the `IntervalSet` sometimes is used to represent `handle` vs `int`, so it cans `CanProveEqual` - a bit weird to me, but definitely fixable with more guards
   
   ```
     16: _M_invoke
           at /usr/include/c++/7/bits/std_function.h:316
     15: operator()
           at /workspace/src/te/operation/compute_op.cc:216
     14: tvm::arith::IntSetAnalyzer::operator()(tvm::PrimExpr const&, tvm::runtime::Map<tvm::tir::Var, tvm::arith::IntSet, void, void> const&)
           at /workspace/src/arith/int_set.cc:521
     13: tvm::arith::IntSetAnalyzer::Impl::Eval(tvm::PrimExpr const&, tvm::runtime::Map<tvm::tir::Var, tvm::arith::IntSet, void, void> const&) const
           at /workspace/src/arith/int_set.cc:509
     12: tvm::arith::IntervalSetEvaluator::Eval(tvm::PrimExpr const&)
           at /workspace/src/arith/int_set.cc:351
     11: tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>::VisitExpr(tvm::PrimExpr const&)
           at /workspace/include/tvm/tir/expr_functor.h:114
     10: tvm::NodeFunctor<tvm::arith::IntervalSet (tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*) const
           at /workspace/include/tvm/node/functor.h:97
     9: tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>::InitVTable()::{lambda(tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*)#8}::_FUN(tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*)
           at /workspace/include/tvm/tir/expr_functor.h:171
     8: tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>::InitVTable()::{lambda(tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*)#8}::operator()(tvm::runtime::ObjectRef const&, tvm::tir::ExprFunctor<tvm::arith::IntervalSet (tvm::PrimExpr const&)>*) const
           at /workspace/include/tvm/tir/expr_functor.h:171
     7: tvm::arith::IntervalSetEvaluator::VisitExpr_(tvm::tir::AddNode const*)
           at /workspace/src/arith/int_set.cc:383
     6: tvm::arith::IntervalSet tvm::arith::IntervalSetEvaluator::VisitBinaryExpr_<tvm::tir::Add, tvm::tir::AddNode>(tvm::tir::AddNode const*)
           at /workspace/src/arith/int_set.cc:493
     5: tvm::arith::IntervalSet tvm::arith::Combine<tvm::tir::Add>(tvm::arith::Analyzer*, tvm::arith::IntervalSet, tvm::arith::IntervalSet)
           at /workspace/src/arith/int_set.cc:126
     4: tvm::arith::IntervalSetNode::IsSinglePoint() const
           at /workspace/src/arith/interval_set.h:67
     3: tvm::arith::Analyzer::CanProveEqual(tvm::PrimExpr const&, tvm::PrimExpr const&)
           at /workspace/src/arith/analyzer.cc:107
     2: tvm::operator==(tvm::PrimExpr, tvm::PrimExpr)
           at /workspace/src/tir/op/op.cc:501
     1: tvm::equal(tvm::PrimExpr, tvm::PrimExpr, tvm::Span)
           at /workspace/src/tir/op/op.cc:503
     0: tvm::BinaryOpMatchTypes(tvm::PrimExpr&, tvm::PrimExpr&, tvm::Span)
           at /workspace/src/tir/op/op.cc:163
     File "/workspace/src/tir/op/op.cc", line 163
   TVMError: Cannot match type handle vs int32
   ```


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