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/26 01:04:23 UTC

[GitHub] [tvm] Hzfengsy commented on a diff in pull request #12184: [MetaSchedule] Remove Root Block From Collector

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