huajsj commented on a change in pull request #9494:
URL: https://github.com/apache/tvm/pull/9494#discussion_r748653083



##########
File path: python/tvm/contrib/pipeline_executor.py
##########
@@ -93,8 +107,76 @@ def __init__(self, module):
         else:
             self.module = module
         # Get the packed functions from the pipeline executor.
+        self._run = self.module["run"]
+        self._stop = self.module["stop"]
+        self._set_input = self.module["set_input"]
+        self._set_param = self.module["set_param"]
+        self._get_input = self.module["get_input"]
+        self._get_output = self.module["get_output"]
+        self._get_num_inputs = self.module["get_num_inputs"]
         self._get_num_outputs = self.module["get_num_outputs"]
 
+    def run(self, sync=False):
+        """Run the pipeline executor."""
+        self._run(sync)
+
+    def stop(self):
+        """Stop the pipeline executor."""
+        self._stop()
+
+    def set_input(self, key, value):
+        """Set inputs to the module via "value".
+        Parameters
+        ----------
+        key : str
+            The input key
+
+        value : array_like.
+            The input value
+        """
+        v = self._get_input(key)
+        if v is None:
+            raise RuntimeError("Could not find '%s' in pipeline's inputs" % 
key)
+        v.copyfrom(value)

Review comment:
       sure, the said logic seems like already follow the same logic as what 
graph_executor did and no redundant buffer creation, could you help to give 
more detail information about which part cause the problem?




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