huajsj commented on a change in pull request #9846:
URL: https://github.com/apache/tvm/pull/9846#discussion_r784259867
##########
File path: python/tvm/contrib/pipeline_executor.py
##########
@@ -125,6 +130,33 @@ def get_input_pipeline_map(self, name):
"""
return self._get_input_pipeline_map(name)
+ def get_params_group_pipeline_map(self, name):
+ """Using the "name" of parameters group to get the corresponding
runtime module index.
+ Returns
+ -------
+ Runtime module index: Integer
+ Returning the index of the runtime module.
+ """
+ return self._get_params_group_pipeline_map(name)
+
+ def set_params(self, params_group_name, params_data):
+ """Pipeline executor uses a map of parameters groups and module
indexes to support
+ the "on the fly" parameters setting. For example, in order to declare
that runtime
+ module 1 using group parameters named "param0", pipeline executor maps
the parameters
+ group named "param0" with runtime 1. This function is used to set
parameters into
+ to correct runtime module by using the parameters group name.
+ ----------
+ params_group_name : str
+ It is the parameters group name.
+ params_data : dict of str to NDArray
+ There is a list of parameters data and params key name.
+ """
Review comment:
like the input logic in pipeline executor config, before call
set_params, user need to build a map for parameters group name and module
index, for example
"pipe_config["param_group"]["param0"].connect(pipe_config[mod1]["param"])",
then the pipeline executor would know "param0" is corresponding module 1.
--
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]