Browse Source

Add single_op model_id.

tags/v1.2.0
unknown 3 years ago
parent
commit
1c10a5ace3
2 changed files with 6 additions and 6 deletions
  1. +4
    -4
      ge/executor/ge_executor.cc
  2. +2
    -2
      inc/framework/executor/ge_executor.h

+ 4
- 4
ge/executor/ge_executor.cc View File

@@ -931,20 +931,20 @@ Status GeExecutor::GetMemAndWeightSize(const void *model_data, size_t model_size


Status GeExecutor::LoadSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream, Status GeExecutor::LoadSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
SingleOp **single_op) { SingleOp **single_op) {
return LoadSingleOp(model_name, modelData, stream, single_op, 0);
return LoadSingleOpV2(model_name, modelData, stream, single_op, 0);
} }


Status GeExecutor::LoadSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
Status GeExecutor::LoadSingleOpV2(const std::string &model_name, const ge::ModelData &modelData, void *stream,
SingleOp **single_op, const uint64_t model_id) { SingleOp **single_op, const uint64_t model_id) {
return SingleOpManager::GetInstance().GetOpFromModel(model_name, modelData, stream, single_op, model_id); return SingleOpManager::GetInstance().GetOpFromModel(model_name, modelData, stream, single_op, model_id);
} }


Status GeExecutor::LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream, Status GeExecutor::LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
DynamicSingleOp **single_op) { DynamicSingleOp **single_op) {
return LoadDynamicSingleOp(model_name, modelData, stream, single_op, 0);
return LoadDynamicSingleOpV2(model_name, modelData, stream, single_op, 0);
} }


Status GeExecutor::LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
Status GeExecutor::LoadDynamicSingleOpV2(const std::string &model_name, const ge::ModelData &modelData, void *stream,
DynamicSingleOp **single_op, const uint64_t model_id) { DynamicSingleOp **single_op, const uint64_t model_id) {
return SingleOpManager::GetInstance().GetDynamicOpFromModel(model_name, modelData, stream, single_op, model_id); return SingleOpManager::GetInstance().GetDynamicOpFromModel(model_name, modelData, stream, single_op, model_id);
} }


+ 2
- 2
inc/framework/executor/ge_executor.h View File

@@ -260,7 +260,7 @@ class GE_FUNC_VISIBILITY GeExecutor {
static ge::Status LoadSingleOp(const std::string &modelName, const ge::ModelData &modelData, void *stream, static ge::Status LoadSingleOp(const std::string &modelName, const ge::ModelData &modelData, void *stream,
SingleOp **single_op); SingleOp **single_op);


static ge::Status LoadSingleOp(const std::string &modelName, const ge::ModelData &modelData, void *stream,
static ge::Status LoadSingleOpV2(const std::string &modelName, const ge::ModelData &modelData, void *stream,
SingleOp **single_op, const uint64_t model_id); SingleOp **single_op, const uint64_t model_id);


static ge::Status ExecuteAsync(SingleOp *executor, const std::vector<DataBuffer> &inputs, static ge::Status ExecuteAsync(SingleOp *executor, const std::vector<DataBuffer> &inputs,
@@ -269,7 +269,7 @@ class GE_FUNC_VISIBILITY GeExecutor {
static ge::Status LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream, static ge::Status LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
DynamicSingleOp **single_op); DynamicSingleOp **single_op);


static ge::Status LoadDynamicSingleOp(const std::string &model_name, const ge::ModelData &modelData, void *stream,
static ge::Status LoadDynamicSingleOpV2(const std::string &model_name, const ge::ModelData &modelData, void *stream,
DynamicSingleOp **single_op, const uint64_t model_id); DynamicSingleOp **single_op, const uint64_t model_id);


static ge::Status ExecuteAsync(DynamicSingleOp *executor, const std::vector<GeTensorDesc> &input_desc, static ge::Status ExecuteAsync(DynamicSingleOp *executor, const std::vector<GeTensorDesc> &input_desc,


Loading…
Cancel
Save