Class ModelGroup
Defined in File model_group.h
Class Documentation
-
class ModelGroup
The ModelGroup class is used to define a MindSpore model group, facilitating multiple models to share workspace memory.
Public Functions
-
Status AddModel(const std::vector<std::string> &model_path_list)
Add models that require shared workspace memory.
- Parameters
model_path_list – [in] Define the list of model path.
- Returns
Status.
-
Status AddModel(const std::vector<std::pair<const void*, size_t>> &model_buff_list)
Add models that require shared workspace memory.
- Parameters
model_buff_list – [in] Define the list of model buff.
- Returns
Status.
-
Status CalMaxSizeOfWorkspace(ModelType model_type, const std::shared_ptr<Context> &ms_context)
Calculate the max workspace of the added models.
- Parameters
model_type – [in] Define The type of model file. Options: ModelType::kMindIR_Lite, ModelType::kMindIR. Only ModelType::kMindIR_Lite is valid for Lite.
ms_context – [in] A context used to store options.
- Returns
Status.
-
Status AddModel(const std::vector<std::string> &model_path_list)