|
|
@@ -538,9 +538,9 @@ namespace { |
|
|
return is_need; |
|
|
return is_need; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const vector<GeTensor> &inputs, const vector<GeTensor> &outputs, |
|
|
|
|
|
const string &model_file_name, OpEngineType engine_type, ModelBufferData &model_buff, |
|
|
|
|
|
bool is_offline) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Status GeGenerator::CheckForSingleOp(OpDescPtr &op_desc, const vector<GeTensor> &inputs, |
|
|
|
|
|
const vector<GeTensor> &outputs) { |
|
|
GE_CHECK_NOTNULL_EXEC(op_desc, return PARAM_INVALID); |
|
|
GE_CHECK_NOTNULL_EXEC(op_desc, return PARAM_INVALID); |
|
|
if (!inputs.empty() && (inputs.size() != op_desc->GetAllInputsSize())) { |
|
|
if (!inputs.empty() && (inputs.size() != op_desc->GetAllInputsSize())) { |
|
|
GELOGE(PARAM_INVALID, "Tensor size: %zu, Inputs size: %zu", inputs.size(), op_desc->GetAllInputsSize()); |
|
|
GELOGE(PARAM_INVALID, "Tensor size: %zu, Inputs size: %zu", inputs.size(), op_desc->GetAllInputsSize()); |
|
|
@@ -550,7 +550,17 @@ Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const vector<GeTensor> &in |
|
|
GELOGE(PARAM_INVALID, "Tensor size: %zu, Outputs size: %zu", outputs.size(), op_desc->GetOutputsSize()); |
|
|
GELOGE(PARAM_INVALID, "Tensor size: %zu, Outputs size: %zu", outputs.size(), op_desc->GetOutputsSize()); |
|
|
return PARAM_INVALID; |
|
|
return PARAM_INVALID; |
|
|
} |
|
|
} |
|
|
|
|
|
return SUCCESS; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Status GeGenerator::BuildSingleOp(OpDescPtr &op_desc, const vector<GeTensor> &inputs, const vector<GeTensor> &outputs, |
|
|
|
|
|
const string &model_file_name, OpEngineType engine_type, ModelBufferData &model_buff, |
|
|
|
|
|
bool is_offline) { |
|
|
|
|
|
|
|
|
|
|
|
if (CheckForSingleOp(op_desc, inputs, outputs) != SUCCESS) { |
|
|
|
|
|
GELOGE(PARAM_INVALID, "input param is invalid when build single op!"); |
|
|
|
|
|
return PARAM_INVALID; |
|
|
|
|
|
} |
|
|
OmgContext &omg_context = (impl_ == nullptr) ? domi::GetContext() : impl_->omg_context_; |
|
|
OmgContext &omg_context = (impl_ == nullptr) ? domi::GetContext() : impl_->omg_context_; |
|
|
omg_context.is_dynamic_input = ContainsDynamicInpus(*op_desc); |
|
|
omg_context.is_dynamic_input = ContainsDynamicInpus(*op_desc); |
|
|
|
|
|
|
|
|
|