Tantalus13A98B5F commented on a change in pull request #8113:
URL: https://github.com/apache/tvm/pull/8113#discussion_r638396696



##########
File path: python/tvm/autotvm/measure/measure_methods.py
##########
@@ -242,6 +243,22 @@ def __init__(
 
         self.executor = LocalExecutor(timeout=timeout * (self.n_parallel + 1))
 
+    @property
+    def ref_input(self):
+        """Fixed input for tuning special operators."""
+        return self._ref_input if hasattr(self, "_ref_input") else None

Review comment:
       The aim for using `property` is to raise warning whenever setting the 
attribute. In prior versions, there is no entry for `ref_input` in the ctor 
arg, and it will be set after the object is initialized. Thus IMO it is 
reasonable to do the warnings and check we want in a separate setter function 
rather than the ctor. But yes, we can add an optional entry in the ctor, and 
the `if` expression can definitely be resolved. 




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

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


Reply via email to