yelite commented on code in PR #13399:
URL: https://github.com/apache/tvm/pull/13399#discussion_r1024267757


##########
tests/python/unittest/test_meta_schedule_task_scheduler.py:
##########
@@ -352,10 +353,85 @@ def 
test_meta_schedule_task_scheduler_multiple_gradient_based():
         )
 
 
+def 
test_meta_schedule_task_scheduler_gradient_based_with_null_search_strategy():
+    """
+    When search strategy of one task returns empty list of candidates,
+    the scheduler should continue working as normal for other tasks
+    """
+
+    @ms.derived_object
+    class NullSearchStrategy(ms.search_strategy.PySearchStrategy):
+        def __init__(self, n=0):
+            self.n = n
+
+        def _initialize_with_tune_context(self, context: "TuneContext") -> 
None:
+            pass
+
+        def pre_tuning(self, *args, **kwargs):
+            pass
+
+        def post_tuning(self):
+            pass
+
+        def generate_measure_candidates(self):
+            """
+            Returns empty list to indicate there is no result from search, 
while
+            the search isn't ended.
+            """
+            self.n += 1
+            if self.n <= 10:
+                return []
+            return None

Review Comment:
   This is fixed now. I have also seen this when I tried to tune with 0 global 
trial limit. Thanks for hinting the way to fix this.



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