masahi commented on code in PR #10975:
URL: https://github.com/apache/tvm/pull/10975#discussion_r849055781


##########
src/meta_schedule/space_generator/post_order_apply.cc:
##########
@@ -136,19 +136,31 @@ class PostOrderApplyNode : public SpaceGeneratorNode {
           stack.emplace_back(sch, blocks);
           continue;
         }
+
         Optional<String> ann = tir::GetAnn<String>(sch->GetSRef(block_rv), 
"schedule_rule");
-        if (ann.defined() == sch_rule.defined() || (ann.defined() && 
ann.value() == "None")) {
+        bool has_schedule_rule = ann.defined() && 
runtime::Registry::Get(ann.value()) != nullptr;
+
+        if (ann.defined() && !has_schedule_rule) {
+          LOG(WARNING) << "Custom schedule rule not found, ignoring 
schedule_rule annotation: "
+                       << ann.value();
+        }
+
+        if ((has_schedule_rule && sch_rule.defined()) ||
+            (!has_schedule_rule && !sch_rule.defined()) ||

Review Comment:
   `ann.defined() == sch_rule.defined()` condition is replaced with this 
condition. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to