|
|
@@ -63,19 +63,18 @@ using std::shared_ptr; |
|
|
using std::string; |
|
|
using std::string; |
|
|
using std::vector; |
|
|
using std::vector; |
|
|
|
|
|
|
|
|
|
|
|
namespace { |
|
|
static bool is_dynamic_input = false; |
|
|
static bool is_dynamic_input = false; |
|
|
|
|
|
|
|
|
const char *const kModeSupport = "only support 0(model to framework model), " |
|
|
const char *const kModeSupport = "only support 0(model to framework model), " |
|
|
"1(framework model to json), 3(only pre-check), " |
|
|
"1(framework model to json), 3(only pre-check), " |
|
|
"5(pbtxt to json), 6(display model info)"; |
|
|
"5(pbtxt to json), 6(display model info)"; |
|
|
const char *const kModelToJsonSupport = "only support 0(Caffe) 3(TensorFlow) 5(Onnx)"; |
|
|
const char *const kModelToJsonSupport = "only support 0(Caffe) 3(TensorFlow) 5(Onnx)"; |
|
|
|
|
|
|
|
|
static const char *const kCaffeFormatSupport = "only support NCHW, ND in Caffe model"; |
|
|
|
|
|
static const char *const kTFFormatSupport = "only support NCHW, NHWC, ND, NCDHW, NDHWC in TF model"; |
|
|
|
|
|
static const char *const kONNXFormatSupport = "only support NCHW, ND in ONNX model"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *const kCaffeFormatSupport = "only support NCHW, ND in Caffe model"; |
|
|
|
|
|
const char *const kTFFormatSupport = "only support NCHW, NHWC, ND, NCDHW, NDHWC in TF model"; |
|
|
|
|
|
const char *const kONNXFormatSupport = "only support NCHW, ND in ONNX model"; |
|
|
// limit available mem size 2G |
|
|
// limit available mem size 2G |
|
|
const long kMinAvailableMem = 2097152; // 2 * 1024 * 1024 |
|
|
const long kMinAvailableMem = 2097152; // 2 * 1024 * 1024 |
|
|
|
|
|
} // namespace |
|
|
|
|
|
|
|
|
DEFINE_string(model, "", "The model file."); |
|
|
DEFINE_string(model, "", "The model file."); |
|
|
DEFINE_string(output, "", "The output file path&name."); |
|
|
DEFINE_string(output, "", "The output file path&name."); |
|
|
@@ -523,12 +522,12 @@ class GFlagUtils { |
|
|
static bool CheckEncryptModeValid(const int encrypt_mode) { |
|
|
static bool CheckEncryptModeValid(const int encrypt_mode) { |
|
|
#if !defined(__ANDROID__) && !defined(ANDROID) |
|
|
#if !defined(__ANDROID__) && !defined(ANDROID) |
|
|
if (encrypt_mode != 0 && encrypt_mode != -1) { |
|
|
if (encrypt_mode != 0 && encrypt_mode != -1) { |
|
|
GELOGE(ge::FAILED, "encrypt mode must be 0 or -1"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "encrypt mode must be 0 or -1"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
#else |
|
|
#else |
|
|
if (encrypt_mode != -1) { |
|
|
if (encrypt_mode != -1) { |
|
|
GELOGE(ge::FAILED, "encrypt mode must be -1"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "encrypt mode must be -1"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
@@ -543,14 +542,14 @@ class GFlagUtils { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
"E10007", {"parameter", "support"}, |
|
|
"E10007", {"parameter", "support"}, |
|
|
{"framework", "0(Caffe) or 1(MindSpore) or 3(TensorFlow) or 5(Onnx)"}); |
|
|
{"framework", "0(Caffe) or 1(MindSpore) or 3(TensorFlow) or 5(Onnx)"}); |
|
|
GELOGE(ge::FAILED, "Input parameter[--framework] is mandatory and it's value must be: " |
|
|
|
|
|
"0(Caffe) or 1(MindSpore) or 3(TensorFlow) or 5(Onnx)."); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Input parameter[--framework] is mandatory and it's value must be: " |
|
|
|
|
|
"0(Caffe) or 1(MindSpore) or 3(TensorFlow) or 5(Onnx)."); |
|
|
return domi::PARAM_INVALID; |
|
|
return domi::PARAM_INVALID; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ((framework == (int32_t)domi::CAFFE) && (weight_file == "")) { |
|
|
if ((framework == (int32_t)domi::CAFFE) && (weight_file == "")) { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10008", {"parameter"}, {"weight"}); |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10008", {"parameter"}, {"weight"}); |
|
|
GELOGE(ge::FAILED, "Input parameter[--weight]'s value is empty when framework is 0(CAFFE)!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Input parameter[--weight]'s value is empty when framework is 0(CAFFE)!"); |
|
|
return domi::PARAM_INVALID; |
|
|
return domi::PARAM_INVALID; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -584,7 +583,7 @@ class GFlagUtils { |
|
|
// Failure if no filename follows the path |
|
|
// Failure if no filename follows the path |
|
|
if (slashPosition == static_cast<int>(fileName.size() - 1)) { |
|
|
if (slashPosition == static_cast<int>(fileName.size() - 1)) { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10022", {"parameter", "filename"}, {"output", fileName}); |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10022", {"parameter", "filename"}, {"output", fileName}); |
|
|
GELOGE(ge::FAILED, "Input parameter[--output]'s path[%s] not include file name", fileName.c_str()); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Input parameter[--output]'s path[%s] not include file name", fileName.c_str()); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -628,7 +627,7 @@ static bool CheckInputFormat() { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kCaffeFormatSupport}); |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kCaffeFormatSupport}); |
|
|
GELOGE(ge::FAILED, |
|
|
GELOGE(ge::FAILED, |
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kCaffeFormatSupport); |
|
|
|
|
|
|
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kCaffeFormatSupport); |
|
|
return false; |
|
|
return false; |
|
|
} else if ((FLAGS_framework == static_cast<int32_t>(domi::TENSORFLOW))) { // tf |
|
|
} else if ((FLAGS_framework == static_cast<int32_t>(domi::TENSORFLOW))) { // tf |
|
|
if (ge::tf_support_input_format.find(FLAGS_input_format) != ge::tf_support_input_format.end()) { |
|
|
if (ge::tf_support_input_format.find(FLAGS_input_format) != ge::tf_support_input_format.end()) { |
|
|
@@ -638,7 +637,7 @@ static bool CheckInputFormat() { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kTFFormatSupport}); |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kTFFormatSupport}); |
|
|
GELOGE(ge::FAILED, |
|
|
GELOGE(ge::FAILED, |
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kTFFormatSupport); |
|
|
|
|
|
|
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kTFFormatSupport); |
|
|
return false; |
|
|
return false; |
|
|
} else if (FLAGS_framework == static_cast<int32_t>(domi::ONNX)) { |
|
|
} else if (FLAGS_framework == static_cast<int32_t>(domi::ONNX)) { |
|
|
if (ge::onnx_support_input_format.find(FLAGS_input_format) != ge::onnx_support_input_format.end()) { |
|
|
if (ge::onnx_support_input_format.find(FLAGS_input_format) != ge::onnx_support_input_format.end()) { |
|
|
@@ -648,7 +647,7 @@ static bool CheckInputFormat() { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
ErrorManager::GetInstance().ATCReportErrMessage( |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kONNXFormatSupport}); |
|
|
"E10001", {"parameter", "value", "reason"}, {"--input_format", FLAGS_input_format, kONNXFormatSupport}); |
|
|
GELOGE(ge::FAILED, |
|
|
GELOGE(ge::FAILED, |
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kONNXFormatSupport); |
|
|
|
|
|
|
|
|
"Invalid value for --input_format[%s], %s.", FLAGS_input_format.c_str(), kONNXFormatSupport); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
@@ -804,7 +803,7 @@ Status CreateInputsForInference(const ge::Graph &graph, vector<ge::GeTensor> &in |
|
|
GE_CHECK_NOTNULL(input_node); |
|
|
GE_CHECK_NOTNULL(input_node); |
|
|
ge::OpDescPtr op = input_node->GetOpDesc(); |
|
|
ge::OpDescPtr op = input_node->GetOpDesc(); |
|
|
GE_CHECK_NOTNULL(op); |
|
|
GE_CHECK_NOTNULL(op); |
|
|
if (op->GetType() == "Data") { |
|
|
|
|
|
|
|
|
if (op->GetType() == ge::DATA) { |
|
|
GELOGI("Data op inputDesc size is: %zu", op->GetAllInputsDesc().size()); |
|
|
GELOGI("Data op inputDesc size is: %zu", op->GetAllInputsDesc().size()); |
|
|
ge::GeTensorDesc tensor = op->GetInputDesc(0); |
|
|
ge::GeTensorDesc tensor = op->GetInputDesc(0); |
|
|
string data_op_name = op->GetName(); |
|
|
string data_op_name = op->GetName(); |
|
|
@@ -845,7 +844,7 @@ domi::Status GenerateInfershapeJson() { |
|
|
std::map<string, string> options; |
|
|
std::map<string, string> options; |
|
|
ge::Status geRet = ge_generator.Initialize(options, domi::GetContext()); |
|
|
ge::Status geRet = ge_generator.Initialize(options, domi::GetContext()); |
|
|
if (geRet != ge::SUCCESS) { |
|
|
if (geRet != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -855,19 +854,19 @@ domi::Status GenerateInfershapeJson() { |
|
|
ret = ParseGraph(graph, atc_params, FLAGS_om.c_str(), FLAGS_weight.c_str(), (domi::FrameworkType) FLAGS_framework, |
|
|
ret = ParseGraph(graph, atc_params, FLAGS_om.c_str(), FLAGS_weight.c_str(), (domi::FrameworkType) FLAGS_framework, |
|
|
"", FLAGS_target.c_str(), (ge::RunMode) FLAGS_mode, false); |
|
|
"", FLAGS_target.c_str(), (ge::RunMode) FLAGS_mode, false); |
|
|
if (ret != ge::SUCCESS) { |
|
|
if (ret != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "ATC Parse graph domi::FAILED"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Parse graph domi::FAILED"); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
geRet = ge_generator.GenerateInfershapeGraph(graph); |
|
|
geRet = ge_generator.GenerateInfershapeGraph(graph); |
|
|
if (geRet != ge::SUCCESS) { |
|
|
if (geRet != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "ATC GenerateInfershapeJson failed"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ATC GenerateInfershapeJson failed"); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
if (DumpInfershapeJson(graph, FLAGS_json.c_str()) != SUCCESS) { |
|
|
if (DumpInfershapeJson(graph, FLAGS_json.c_str()) != SUCCESS) { |
|
|
GELOGE(ge::FAILED, "ATC DumpInfershapeJson failed"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ATC DumpInfershapeJson failed"); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
@@ -935,12 +934,12 @@ domi::Status GenerateModel(std::map<string, string> &options, std::string output |
|
|
ge::Status geRet = ge::SUCCESS; |
|
|
ge::Status geRet = ge::SUCCESS; |
|
|
geRet = ge::GEInit::Initialize(options); |
|
|
geRet = ge::GEInit::Initialize(options); |
|
|
if (geRet != ge::SUCCESS) { |
|
|
if (geRet != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GE initialize failed!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GE initialize failed!"); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
geRet = ge_generator.Initialize(options, domi::GetContext()); |
|
|
geRet = ge_generator.Initialize(options, domi::GetContext()); |
|
|
if (geRet != ge::SUCCESS) { |
|
|
if (geRet != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
@@ -953,8 +952,8 @@ domi::Status GenerateModel(std::map<string, string> &options, std::string output |
|
|
auto ret1 = load_model.LoadFromFile(FLAGS_model); |
|
|
auto ret1 = load_model.LoadFromFile(FLAGS_model); |
|
|
if (ret1 != ge::GRAPH_SUCCESS) { |
|
|
if (ret1 != ge::GRAPH_SUCCESS) { |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10041", {"parameter"}, {FLAGS_model}); |
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E10041", {"parameter"}, {FLAGS_model}); |
|
|
GELOGE(ge::FAILED, "Load model from %s failed, please check model file or " |
|
|
|
|
|
"input parameter[--framework] is correct", FLAGS_model.c_str()); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Load model from %s failed, please check model file or " |
|
|
|
|
|
"input parameter[--framework] is correct", FLAGS_model.c_str()); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
@@ -995,21 +994,21 @@ domi::Status GenerateModel(std::map<string, string> &options, std::string output |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
if (ret != ge::SUCCESS) { |
|
|
if (ret != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "ATC precheck fail."); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ATC precheck fail."); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
return domi::SUCCESS; |
|
|
return domi::SUCCESS; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ret != ge::SUCCESS) { |
|
|
if (ret != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "ATC Parse graph domi::FAILED"); |
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Generate execute failed"); // Duplicate log. (for test case |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Parse graph domi::FAILED"); |
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Generate execute failed"); // Duplicate log. (for test case |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
if (ge::SetOutputNodeInfo(graph, FLAGS_output_type, "") != domi::SUCCESS) { |
|
|
if (ge::SetOutputNodeInfo(graph, FLAGS_output_type, "") != domi::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "Set output node info fail."); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Set output node info fail."); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
@@ -1024,8 +1023,8 @@ domi::Status GenerateModel(std::map<string, string> &options, std::string output |
|
|
|
|
|
|
|
|
geRet = ge_generator.GenerateOfflineModel(graph, output, inputs); |
|
|
geRet = ge_generator.GenerateOfflineModel(graph, output, inputs); |
|
|
if (geRet != ge::SUCCESS) { |
|
|
if (geRet != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GE GenerateOfflineModel execute failed"); |
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Generate execute failed"); // Duplicate log. (for test case |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GE GenerateOfflineModel execute failed"); |
|
|
|
|
|
GELOGE(ge::FAILED, "ATC Generate execute failed"); // Duplicate log. (for test case |
|
|
// checking error log) |
|
|
// checking error log) |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge_generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
@@ -1061,7 +1060,7 @@ static void SetEnvForSingleOp(std::map<string, string> &options) { |
|
|
|
|
|
|
|
|
domi::Status GenerateSingleOp(const std::string& json_file_path) { |
|
|
domi::Status GenerateSingleOp(const std::string& json_file_path) { |
|
|
if (!FLAGS_output.empty() && !ge::CheckOutputPathValid(FLAGS_output, "--output")) { |
|
|
if (!FLAGS_output.empty() && !ge::CheckOutputPathValid(FLAGS_output, "--output")) { |
|
|
GELOGE(ge::FAILED, "output path %s is not valid!", FLAGS_output.c_str()); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "output path %s is not valid!", FLAGS_output.c_str()); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
// check optypelist_for_implmode and op_select_implmode |
|
|
// check optypelist_for_implmode and op_select_implmode |
|
|
@@ -1075,21 +1074,21 @@ domi::Status GenerateSingleOp(const std::string& json_file_path) { |
|
|
|
|
|
|
|
|
auto ret = ge::GEInit::Initialize(options); |
|
|
auto ret = ge::GEInit::Initialize(options); |
|
|
if (ret != ge::SUCCESS) { |
|
|
if (ret != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GE initialize failed!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GE initialize failed!"); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ge::GeGenerator generator; |
|
|
ge::GeGenerator generator; |
|
|
ret = generator.Initialize(options, domi::GetContext()); |
|
|
ret = generator.Initialize(options, domi::GetContext()); |
|
|
if (ret != SUCCESS) { |
|
|
if (ret != SUCCESS) { |
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "GeGenerator initialize failed!"); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
vector<ge::SingleOpBuildParam> build_params; |
|
|
vector<ge::SingleOpBuildParam> build_params; |
|
|
if (ge::SingleOpParser::ParseSingleOpList(json_file_path, build_params) != ge::SUCCESS) { |
|
|
if (ge::SingleOpParser::ParseSingleOpList(json_file_path, build_params) != ge::SUCCESS) { |
|
|
GELOGE(ge::FAILED, "parse single op json file failed"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "parse single op json file failed"); |
|
|
(void)generator.Finalize(); |
|
|
(void)generator.Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
(void)ge::GEInit::Finalize(); |
|
|
return domi::FAILED; |
|
|
return domi::FAILED; |
|
|
@@ -1104,7 +1103,7 @@ domi::Status GenerateSingleOp(const std::string& json_file_path) { |
|
|
output_path += param.file_name; |
|
|
output_path += param.file_name; |
|
|
ret = generator.BuildSingleOpModel(param.op_desc, param.inputs, param.outputs, output_path); |
|
|
ret = generator.BuildSingleOpModel(param.op_desc, param.inputs, param.outputs, output_path); |
|
|
if (ret != SUCCESS) { |
|
|
if (ret != SUCCESS) { |
|
|
GELOGE(ge::FAILED, "Compile op failed. ge ret = %u, op index = %d", ret, index); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "Compile op failed. ge ret = %u, op index = %d", ret, index); |
|
|
ret = domi::FAILED; |
|
|
ret = domi::FAILED; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
@@ -1320,10 +1319,11 @@ int init(int argc, char* argv[]) { |
|
|
std::string path_base = ge::GEInit::GetPath(); |
|
|
std::string path_base = ge::GEInit::GetPath(); |
|
|
ret = ErrorManager::GetInstance().Init(path_base); |
|
|
ret = ErrorManager::GetInstance().Init(path_base); |
|
|
if (ret != 0) { |
|
|
if (ret != 0) { |
|
|
GELOGE(ge::FAILED, "ErrorManager init fail !"); |
|
|
|
|
|
|
|
|
GELOGE(ge::FAILED, "ErrorManager init fail !"); |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ErrorManager::GetInstance().GenWorkStreamIdDefault(); |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|