merrymercy commented on a change in pull request #6842:
URL: https://github.com/apache/incubator-tvm/pull/6842#discussion_r519157759



##########
File path: python/tvm/auto_scheduler/compute_dag.py
##########
@@ -182,3 +187,11 @@ def hash_key(self):
 
         str_key = str_key.encode(encoding="utf-8")
         return hashlib.md5(str_key).hexdigest()
+
+    def __getstate__(self):
+        return {"compute": SaveJSON(self.compute), "sche": SaveJSON(self.sche)}
+
+    def __setstate__(self, state):
+        self.compute = LoadJSON(state["compute"])  # pylint: 
disable=assignment-from-no-return

Review comment:
       @comaniac Do we need to explicitly call `SaveJSON`, `LoadJSON` here?
   I find that you don't call these functions in the `SearchTask::__getstate__`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to