Icemist commented on code in PR #12545:
URL: https://github.com/apache/tvm/pull/12545#discussion_r969902913


##########
python/tvm/autotvm/task/space.py:
##########
@@ -822,11 +826,262 @@ def valid(self):
         """
         return not bool(self.errors)
 
+    def is_index_valid(self, index):
+        """Checks if the index satisfies the multi_filter condition
+
+        Parameters
+        ----------
+        index: int
+            index from the range of the space
+
+        Returns
+        -------
+        valid: bool
+            whether the index meets all the constraints
+        """
+        assert 0 <= index < self.range_length
+        if self._shared_filter is None:
+            return True
+        if self._shared_filter_cache is None:
+            self._make_shared_filter_cache()
+        return self._shared_filter_cache[index]
+
+    def multi_filter(self, filter):  # pylint: disable=redefined-builtin
+        """Keeps a function as a multi_filter

Review Comment:
   Updated the description and added an example to the header and documentation 
of the multi-filter function 



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