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/07/25 23:01:24 UTC

[GitHub] [tvm] zxybazh opened a new pull request, #12184: [MetaSchedule] Remove Root Block From Collector

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

   This PR makes sure the root block is avoided in the block collector to avoid issues in #12135. CC @vinx13 


-- 
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 #12184: [MetaSchedule] Remove Root Block From Collector

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


##########
src/meta_schedule/space_generator/post_order_apply.cc:
##########
@@ -55,8 +55,10 @@ class BlockCollector : public tir::StmtVisitor {
     CHECK(block_names_.count(block->name_hint) == 0)
         << "Duplicated block name " << block->name_hint << " in function " << func_name_
         << " not supported!";
-    block_names_.insert(block->name_hint);
-    blocks_to_collect_.push_back(block->name_hint);
+    if (block->name_hint != "root") {

Review Comment:
   It's a bit tricky. Can we skip all opaque blocks (i.e. blocks without block vars)?



##########
src/meta_schedule/space_generator/post_order_apply.cc:
##########
@@ -55,8 +55,10 @@ class BlockCollector : public tir::StmtVisitor {
     CHECK(block_names_.count(block->name_hint) == 0)
         << "Duplicated block name " << block->name_hint << " in function " << func_name_
         << " not supported!";
-    block_names_.insert(block->name_hint);
-    blocks_to_collect_.push_back(block->name_hint);
+    if (block->name_hint != "root") {

Review Comment:
   It's a bit tricky to check the name hint. Can we skip all opaque blocks (i.e. blocks without block vars)?



-- 
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] zxybazh commented on pull request #12184: [MetaSchedule] Remove Root Block From Collector

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

   After some local discussion with Junru I found the problem lies in the tir script. As long as we define the write buffer for the root block (should be no write block), it would not cause autoinline to work on the root block, thus causing no problem. Therefore, I'm closing the PR.


-- 
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] zxybazh commented on a diff in pull request #12184: [MetaSchedule] Remove Root Block From Collector

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


##########
src/meta_schedule/space_generator/post_order_apply.cc:
##########
@@ -55,8 +55,10 @@ class BlockCollector : public tir::StmtVisitor {
     CHECK(block_names_.count(block->name_hint) == 0)
         << "Duplicated block name " << block->name_hint << " in function " << func_name_
         << " not supported!";
-    block_names_.insert(block->name_hint);
-    blocks_to_collect_.push_back(block->name_hint);
+    if (block->name_hint != "root") {

Review Comment:
   Thanks for the suggestion, after some more dig in I found there's no issue with the correct TIR so I would simply close the PR.



-- 
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] zxybazh closed pull request #12184: [MetaSchedule] Remove Root Block From Collector

Posted by GitBox <gi...@apache.org>.
zxybazh closed pull request #12184: [MetaSchedule] Remove Root Block From Collector
URL: https://github.com/apache/tvm/pull/12184


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