huajsj commented on a change in pull request #10234:
URL: https://github.com/apache/tvm/pull/10234#discussion_r806618932
##########
File path: src/runtime/pipeline/pipeline_struct.h
##########
@@ -367,11 +477,21 @@ struct ParamConnectionConfig {
*\brief Backend Runtime.
*/
class BackendRuntime {
+ using ModuleInputPairList =
std::vector<std::pair<std::shared_ptr<BackendRuntime>, int>>;
+
private:
/*\brief The index of runtime indicates the runtime position in the
pipeline.*/
int runtime_idx_;
/*\brief The Runtime module of a backend graph executor.*/
Module module_;
+ /*\brief The thread is associated with the current runtime*/
+ std::thread thread_;
+ /*\brief A list of runtime which depends on the current runtime.*/
+ std::unordered_map<int, ModuleInputPairList> childs_;
Review comment:
fixed.
##########
File path: src/runtime/pipeline/pipeline_struct.h
##########
@@ -367,11 +477,21 @@ struct ParamConnectionConfig {
*\brief Backend Runtime.
*/
class BackendRuntime {
+ using ModuleInputPairList =
std::vector<std::pair<std::shared_ptr<BackendRuntime>, int>>;
+
private:
/*\brief The index of runtime indicates the runtime position in the
pipeline.*/
int runtime_idx_;
/*\brief The Runtime module of a backend graph executor.*/
Module module_;
+ /*\brief The thread is associated with the current runtime*/
+ std::thread thread_;
+ /*\brief A list of runtime which depends on the current runtime.*/
+ std::unordered_map<int, ModuleInputPairList> childs_;
+ /*\brief A map including the runtime input index and the notification data
struction.*/
Review comment:
fixed.
##########
File path: src/runtime/pipeline/pipeline_struct.h
##########
@@ -386,6 +506,99 @@ class BackendRuntime {
tvm::runtime::PackedFunc get_num_inputs_;
tvm::runtime::PackedFunc get_input_index_;
tvm::runtime::PackedFunc run_;
+ /*!\brief The working thread is used to execute the runtimes in pipeline.*/
Review comment:
fixed.
--
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]