You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/18 19:51:39 UTC

[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6927: [AutoScheduler] Register workload when deserializing tasks

comaniac commented on a change in pull request #6927:
URL: https://github.com/apache/incubator-tvm/pull/6927#discussion_r526376532



##########
File path: python/tvm/auto_scheduler/search_task.py
##########
@@ -63,6 +66,11 @@ def __getstate__(self):
     def __setstate__(self, state):
         self.dag = state["dag"]
         self.workload_key = state["workload_key"]
+        try:
+            func_name = json.loads(self.workload_key)[0]
+        except Exception:  # pylint: disable=broad-except
+            raise RuntimeError("Invalid workload key %s" % self.workload_key)
+        register_workload_tensors(func_name, self.dag.tensors)

Review comment:
       Changed the logic accordingly. Now we only register workloads extracted from Relay programs.




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