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/09/19 11:23:47 UTC

[GitHub] [tvm] yincs-intellif opened a new pull request, #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

yincs-intellif opened a new pull request, #12836:
URL: https://github.com/apache/tvm/pull/12836

   When after partition cascade ops, we sometimes meet some unused loops because their extents are negative. 
   This PR enhance RemoveNoOp pass to remove these unused loop.
   
   cc @Hzfengsy 


-- 
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 commented on a diff in pull request #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

Posted by GitBox <gi...@apache.org>.
Hzfengsy commented on code in PR #12836:
URL: https://github.com/apache/tvm/pull/12836#discussion_r974140918


##########
src/tir/transforms/remove_no_op.cc:
##########
@@ -162,6 +168,9 @@ class NoOpRemover : public StmtMutator {
     }
     return stmt.defined() ? stmt : Evaluate(0);
   }
+
+  std::unordered_map<const VarNode*, arith::IntSet> var_range_map;
+  arith::Analyzer analyzer;

Review Comment:
   ```suggestion
     std::unordered_map<const VarNode*, arith::IntSet> var_range_map_;
     arith::Analyzer analyzer_;
   ```
   Also, please add the document



-- 
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] yincs-intellif commented on a diff in pull request #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

Posted by GitBox <gi...@apache.org>.
yincs-intellif commented on code in PR #12836:
URL: https://github.com/apache/tvm/pull/12836#discussion_r974978449


##########
src/tir/transforms/remove_no_op.cc:
##########
@@ -162,6 +168,9 @@ class NoOpRemover : public StmtMutator {
     }
     return stmt.defined() ? stmt : Evaluate(0);
   }
+
+  std::unordered_map<const VarNode*, arith::IntSet> var_range_map;
+  arith::Analyzer analyzer;

Review Comment:
   OK



-- 
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-intellif commented on a diff in pull request #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

Posted by GitBox <gi...@apache.org>.
wrongtest-intellif commented on code in PR #12836:
URL: https://github.com/apache/tvm/pull/12836#discussion_r974965905


##########
src/tir/transforms/remove_no_op.cc:
##########
@@ -87,9 +87,15 @@ class NoOpRemover : public StmtMutator {
     }
   }
   Stmt VisitStmt_(const ForNode* op) final {
+    var_range_map_[op->loop_var.get()] = arith::IntSet::Interval(op->min, op->min + op->extent - 1);

Review Comment:
   recommend arith::IntSet::FromMinExtent() :)



-- 
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] yincs-intellif commented on a diff in pull request #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

Posted by GitBox <gi...@apache.org>.
yincs-intellif commented on code in PR #12836:
URL: https://github.com/apache/tvm/pull/12836#discussion_r974978062


##########
src/tir/transforms/remove_no_op.cc:
##########
@@ -87,9 +87,15 @@ class NoOpRemover : public StmtMutator {
     }
   }
   Stmt VisitStmt_(const ForNode* op) final {
+    var_range_map_[op->loop_var.get()] = arith::IntSet::Interval(op->min, op->min + op->extent - 1);

Review Comment:
   OK



-- 
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-intellif merged pull request #12836: [TIR] Enhance RemoveNoOp pass to remove negative loop

Posted by GitBox <gi...@apache.org>.
wrongtest-intellif merged PR #12836:
URL: https://github.com/apache/tvm/pull/12836


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