| @@ -32,7 +32,7 @@ const char *const kSerializeFormat = "serialize_format"; | |||||
| Status ParseParams(const Message *op_src, ArgOpOperator *const op) { | Status ParseParams(const Message *op_src, ArgOpOperator *const op) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const NodeDef *node = reinterpret_cast<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = reinterpret_cast<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| domi::tensorflow::AttrValue output_attr_value; | domi::tensorflow::AttrValue output_attr_value; | ||||
| if (TensorFlowUtil::FindAttrValue(node, ge::ATTR_NAME_OUTPUT_TENSOR_DESC, output_attr_value)) { | if (TensorFlowUtil::FindAttrValue(node, ge::ATTR_NAME_OUTPUT_TENSOR_DESC, output_attr_value)) { | ||||
| @@ -44,7 +44,7 @@ Status TensorFlowAutoMappingParserAdapter::ParseParams(const Message *op_src, ge | |||||
| GELOGE(PARAM_INVALID, "Op src is null"); | GELOGE(PARAM_INVALID, "Op src is null"); | ||||
| return PARAM_INVALID; | return PARAM_INVALID; | ||||
| } | } | ||||
| const NodeDef *node = PtrToPtr<const Message, const NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = PtrToPtr<const Message, const domi::tensorflow::NodeDef>(op_src); | |||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| if (op_dest == nullptr) { | if (op_dest == nullptr) { | ||||
| REPORT_INNER_ERROR("E19999", "Param op_dest is nullptr, check invalid"); | REPORT_INNER_ERROR("E19999", "Param op_dest is nullptr, check invalid"); | ||||
| @@ -110,7 +110,7 @@ Status TensorFlowAutoMappingParserAdapter::ParseParams(const Message *op_src, ge | |||||
| } | } | ||||
| } | } | ||||
| std::shared_ptr<NodeDef> pkg_node = ge::parser::MakeShared<NodeDef>(); | |||||
| std::shared_ptr<domi::tensorflow::NodeDef> pkg_node = ge::parser::MakeShared<domi::tensorflow::NodeDef>(); | |||||
| GE_CHECK_NOTNULL(pkg_node); | GE_CHECK_NOTNULL(pkg_node); | ||||
| pkg_node->CopyFrom(*node); | pkg_node->CopyFrom(*node); | ||||
| @@ -27,7 +27,7 @@ using domi::ParseParamByOpFunc; | |||||
| namespace ge { | namespace ge { | ||||
| Status TensorFlowCustomParserAdapter::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | Status TensorFlowCustomParserAdapter::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| const NodeDef *node_src = DOMI_DYNAMIC_CAST<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node_src = DOMI_DYNAMIC_CAST<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GE_CHECK_NOTNULL(node_src); | GE_CHECK_NOTNULL(node_src); | ||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node_src->name().c_str(), node_src->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node_src->name().c_str(), node_src->op().c_str()); | ||||
| GE_CHECK_NOTNULL(op_dest); | GE_CHECK_NOTNULL(op_dest); | ||||
| @@ -93,7 +93,7 @@ Status TensorFlowDataParser::ParseInputFromModel(const Message *op_src, const ge | |||||
| GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr_value, TENSORFLOW_ATTR_TYPE_SHAPE), | GE_RETURN_WITH_LOG_IF_ERROR(TensorFlowUtil::CheckAttrHasType(attr_value, TENSORFLOW_ATTR_TYPE_SHAPE), | ||||
| "check Attr %s failed", TENSORFLOW_ATTR_SHAPE.c_str()); | "check Attr %s failed", TENSORFLOW_ATTR_SHAPE.c_str()); | ||||
| const TensorShapeProto &data_shape = attr_value.shape(); | |||||
| const domi::tensorflow::TensorShapeProto &data_shape = attr_value.shape(); | |||||
| for (auto i = 0; i < data_shape.dim_size(); i++) { | for (auto i = 0; i < data_shape.dim_size(); i++) { | ||||
| model_input_dims_v.push_back(data_shape.dim(i).size()); | model_input_dims_v.push_back(data_shape.dim(i).size()); | ||||
| } | } | ||||
| @@ -31,7 +31,7 @@ Status TensorFlowEnterParser::ParseParams(const Message *op_src, ge::OpDescPtr & | |||||
| GE_CHECK_NOTNULL(op_desc); | GE_CHECK_NOTNULL(op_desc); | ||||
| const std::string name = op_desc->GetName(); | const std::string name = op_desc->GetName(); | ||||
| const NodeDef *node = PtrToPtr<const Message, const NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = PtrToPtr<const Message, const domi::tensorflow::NodeDef>(op_src); | |||||
| domi::tensorflow::AttrValue str_attr; | domi::tensorflow::AttrValue str_attr; | ||||
| if (!TensorFlowUtil::FindAttrValue(node, ENTER_ATTR_FRAME_NAME, str_attr)) { | if (!TensorFlowUtil::FindAttrValue(node, ENTER_ATTR_FRAME_NAME, str_attr)) { | ||||
| REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid", | REPORT_CALL_ERROR("E19999", "In NodeDef:%s attr:%s not exist, check invalid", | ||||
| @@ -38,7 +38,7 @@ node { | |||||
| } | } | ||||
| } | } | ||||
| */ | */ | ||||
| domi::Status ParseParams(const NodeDef *node, FillOperator *op) { | |||||
| domi::Status ParseParams(const domi::tensorflow::NodeDef *node, FillOperator *op) { | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| op->Name(node->name()); | op->Name(node->name()); | ||||
| @@ -31,7 +31,7 @@ namespace ge { | |||||
| Status ParseParams(const Message *op_src, FrameworkOpOperator *op) { | Status ParseParams(const Message *op_src, FrameworkOpOperator *op) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const NodeDef *node = reinterpret_cast<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = reinterpret_cast<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| string type = node->op(); | string type = node->op(); | ||||
| @@ -64,7 +64,7 @@ Status ParseParams(const Message *op_src, FrameworkOpOperator *op) { | |||||
| GE_IF_BOOL_EXEC(((type == "_Retval") && (TensorFlowUtil::FindAttrValue(node, ATTR_NAME_INDEX, index_attr_value))), | GE_IF_BOOL_EXEC(((type == "_Retval") && (TensorFlowUtil::FindAttrValue(node, ATTR_NAME_INDEX, index_attr_value))), | ||||
| op->Index(index_attr_value.i())); | op->Index(index_attr_value.i())); | ||||
| NodeDef *pkg_node = new (std::nothrow) NodeDef(); | |||||
| domi::tensorflow::NodeDef *pkg_node = new (std::nothrow) domi::tensorflow::NodeDef(); | |||||
| GE_CHECK_NOTNULL(pkg_node); | GE_CHECK_NOTNULL(pkg_node); | ||||
| pkg_node->CopyFrom(*node); | pkg_node->CopyFrom(*node); | ||||
| @@ -31,7 +31,7 @@ Status TensorFlowMergeParser::ParseParams(const Message *op_src, ge::OpDescPtr & | |||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op_desc); | GE_CHECK_NOTNULL(op_desc); | ||||
| const NodeDef *node = PtrToPtr<const Message, const NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = PtrToPtr<const Message, const domi::tensorflow::NodeDef>(op_src); | |||||
| domi::tensorflow::AttrValue attr_num; | domi::tensorflow::AttrValue attr_num; | ||||
| if (!(TensorFlowUtil::FindAttrValue(node, ATTR_NAME_N, attr_num))) { | if (!(TensorFlowUtil::FindAttrValue(node, ATTR_NAME_N, attr_num))) { | ||||
| GELOGW("In NodeDef %s dynamic attr [%s] is not exist.", op_desc->GetName().c_str(), ATTR_NAME_N.c_str()); | GELOGW("In NodeDef %s dynamic attr [%s] is not exist.", op_desc->GetName().c_str(), ATTR_NAME_N.c_str()); | ||||
| @@ -26,7 +26,7 @@ using namespace ge::parser; | |||||
| namespace ge { | namespace ge { | ||||
| Status TensorFlowNoOpParser::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | Status TensorFlowNoOpParser::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | ||||
| const NodeDef *node = DOMI_DYNAMIC_CAST<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = DOMI_DYNAMIC_CAST<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| NoOpOperator op; | NoOpOperator op; | ||||
| @@ -42,24 +42,6 @@ | |||||
| #include "proto/tensorflow/graph.pb.h" | #include "proto/tensorflow/graph.pb.h" | ||||
| #include "proto/tensorflow/node_def.pb.h" | #include "proto/tensorflow/node_def.pb.h" | ||||
| using domi::tensorflow::NodeDef; | |||||
| using domi::tensorflow::TensorProto; | |||||
| using google::protobuf::int32; | |||||
| using google::protobuf::int64; | |||||
| using google::protobuf::Message; | |||||
| using std::string; | |||||
| using std::vector; | |||||
| using Status = domi::Status; | |||||
| using domi::tensorflow::AttrValue; | |||||
| using domi::tensorflow::DataType; | |||||
| using domi::tensorflow::DT_BOOL; | |||||
| using domi::tensorflow::DT_FLOAT; | |||||
| using domi::tensorflow::DT_INT32; | |||||
| using domi::tensorflow::DT_INT64; | |||||
| using domi::tensorflow::DT_INVALID; | |||||
| using domi::tensorflow::TensorShapeProto; | |||||
| using domi::tensorflow::TensorShapeProto_Dim; | |||||
| namespace ge { | namespace ge { | ||||
| /** | /** | ||||
| * @ingroup domi_omg | * @ingroup domi_omg | ||||
| @@ -2739,7 +2739,7 @@ struct DelTransposeInfo { | |||||
| int inputIdx; | int inputIdx; | ||||
| }; | }; | ||||
| Status GetTransposeInfo(GraphDef *graph_def, std::map<std::string, std::string> &softmaxInfo, | |||||
| Status GetTransposeInfo(domi::tensorflow::GraphDef *graph_def, std::map<std::string, std::string> &softmaxInfo, | |||||
| std::map<std::string, DelTransposeInfo> &transposeInfo) { | std::map<std::string, DelTransposeInfo> &transposeInfo) { | ||||
| GE_CHECK_NOTNULL(graph_def); | GE_CHECK_NOTNULL(graph_def); | ||||
| for (int i = 0; i < graph_def->node_size(); ++i) { | for (int i = 0; i < graph_def->node_size(); ++i) { | ||||
| @@ -2813,7 +2813,7 @@ void TensorFlowModelParser::OptimizeTranspose(std::map<std::string, DelTranspose | |||||
| } | } | ||||
| } | } | ||||
| void TensorFlowModelParser::SoftmaxAddAttr(GraphDef *const graph_def) { | |||||
| void TensorFlowModelParser::SoftmaxAddAttr(domi::tensorflow::GraphDef *const graph_def) { | |||||
| // The caller guarantees that the pointer is not null | // The caller guarantees that the pointer is not null | ||||
| for (int i = 0; i < graph_def->node_size(); ++i) { | for (int i = 0; i < graph_def->node_size(); ++i) { | ||||
| auto node_def = graph_def->mutable_node(i); | auto node_def = graph_def->mutable_node(i); | ||||
| @@ -3021,7 +3021,7 @@ Status TensorFlowModelParser::GetFormatTranspose(const NodeDef *transpose_node, | |||||
| GE_IF_BOOL_EXEC(ge::TensorFlowUtil::CheckAttrHasType(attr_value, TENSORFLOW_ATTR_TYPE_TENSOR) != SUCCESS, | GE_IF_BOOL_EXEC(ge::TensorFlowUtil::CheckAttrHasType(attr_value, TENSORFLOW_ATTR_TYPE_TENSOR) != SUCCESS, | ||||
| return FAILED); | return FAILED); | ||||
| const TensorProto &tensor = attr_value.tensor(); | const TensorProto &tensor = attr_value.tensor(); | ||||
| const TensorShapeProto &tensor_shape = tensor.tensor_shape(); | |||||
| const domi::tensorflow::TensorShapeProto &tensor_shape = tensor.tensor_shape(); | |||||
| GE_IF_BOOL_EXEC(tensor_shape.dim_size() != 1 || tensor_shape.dim(0).size() != parser::DIM_DEFAULT_SIZE, | GE_IF_BOOL_EXEC(tensor_shape.dim_size() != 1 || tensor_shape.dim(0).size() != parser::DIM_DEFAULT_SIZE, | ||||
| return SUCCESS); | return SUCCESS); | ||||
| GE_IF_BOOL_EXEC(tensor.tensor_content().empty(), return SUCCESS); | GE_IF_BOOL_EXEC(tensor.tensor_content().empty(), return SUCCESS); | ||||
| @@ -3108,7 +3108,7 @@ Status TensorFlowModelParser::TrimGraphByInput(const domi::tensorflow::GraphDef | |||||
| placeholder_node.clear_input(); | placeholder_node.clear_input(); | ||||
| GE_IF_BOOL_EXEC(node.op() != "Placeholder", placeholder_node.set_op("Placeholder")); | GE_IF_BOOL_EXEC(node.op() != "Placeholder", placeholder_node.set_op("Placeholder")); | ||||
| domi::tensorflow::AttrValue attr_value; | domi::tensorflow::AttrValue attr_value; | ||||
| TensorShapeProto *data_shape = attr_value.mutable_shape(); | |||||
| domi::tensorflow::TensorShapeProto *data_shape = attr_value.mutable_shape(); | |||||
| GE_CHECK_NOTNULL(data_shape); | GE_CHECK_NOTNULL(data_shape); | ||||
| const ge::ParserContext &ctx = ge::GetParserContext(); | const ge::ParserContext &ctx = ge::GetParserContext(); | ||||
| std::map<std::string, std::vector<int64_t>> input_dims = ctx.input_dims; | std::map<std::string, std::vector<int64_t>> input_dims = ctx.input_dims; | ||||
| @@ -3181,7 +3181,7 @@ Status TensorFlowModelParser::TrimGraphByOutput(const domi::tensorflow::GraphDef | |||||
| placeholder_node.clear_input(); | placeholder_node.clear_input(); | ||||
| GE_IF_BOOL_EXEC(node.op() != "Placeholder", placeholder_node.set_op("Placeholder")); | GE_IF_BOOL_EXEC(node.op() != "Placeholder", placeholder_node.set_op("Placeholder")); | ||||
| domi::tensorflow::AttrValue attr_value; | domi::tensorflow::AttrValue attr_value; | ||||
| TensorShapeProto *data_shape = attr_value.mutable_shape(); | |||||
| domi::tensorflow::TensorShapeProto *data_shape = attr_value.mutable_shape(); | |||||
| GE_CHECK_NOTNULL(data_shape); | GE_CHECK_NOTNULL(data_shape); | ||||
| const ge::ParserContext &ctx = ge::GetParserContext(); | const ge::ParserContext &ctx = ge::GetParserContext(); | ||||
| std::map<std::string, std::vector<int64_t>> input_dims = ctx.input_dims; | std::map<std::string, std::vector<int64_t>> input_dims = ctx.input_dims; | ||||
| @@ -46,15 +46,6 @@ | |||||
| #include "scope/scope_pass_manager.h" | #include "scope/scope_pass_manager.h" | ||||
| #include "common/parser_utils.h" | #include "common/parser_utils.h" | ||||
| using ge::ScopePassManager; | |||||
| using domi::tensorflow::GraphDef; | |||||
| using domi::tensorflow::DT_HALF; | |||||
| using domi::tensorflow::NodeDef; | |||||
| using domi::tensorflow::GraphDef; | |||||
| using domi::tensorflow::AttrValue; | |||||
| using domi::tensorflow::DataType; | |||||
| using ge::OpParser; | |||||
| namespace ge { | namespace ge { | ||||
| using std::string; | using std::string; | ||||
| using std::vector; | using std::vector; | ||||
| @@ -460,7 +451,7 @@ class PARSER_FUNC_VISIBILITY TensorFlowModelParser : public domi::ModelParser { | |||||
| void OptimizeDestroyTemporaryVariable(domi::tensorflow::GraphDef *const graph_def, | void OptimizeDestroyTemporaryVariable(domi::tensorflow::GraphDef *const graph_def, | ||||
| domi::tensorflow::NodeDef *const nodeCurrent, bool &clearInputFlag) const; | domi::tensorflow::NodeDef *const nodeCurrent, bool &clearInputFlag) const; | ||||
| static void OptimizeTranspose(std::map<std::string, DelTransposeInfo> &transposeInfo); | static void OptimizeTranspose(std::map<std::string, DelTransposeInfo> &transposeInfo); | ||||
| static void SoftmaxAddAttr(GraphDef *const graph_def); | |||||
| static void SoftmaxAddAttr(domi::tensorflow::GraphDef *const graph_def); | |||||
| /** | /** | ||||
| * @ingroup domi_omg | * @ingroup domi_omg | ||||
| @@ -30,8 +30,6 @@ | |||||
| #include "parser/tensorflow/tensorflow_op_parser.h" | #include "parser/tensorflow/tensorflow_op_parser.h" | ||||
| #include "proto/tensorflow/node_def.pb.h" | #include "proto/tensorflow/node_def.pb.h" | ||||
| using domi::tensorflow::NodeDef; | |||||
| namespace ge { | namespace ge { | ||||
| class PARSER_FUNC_VISIBILITY TensorflowFinalizeable { | class PARSER_FUNC_VISIBILITY TensorflowFinalizeable { | ||||
| public: | public: | ||||
| @@ -20,8 +20,6 @@ | |||||
| #include "common/op_def/ref_switch_op.h" | #include "common/op_def/ref_switch_op.h" | ||||
| #include "parser/tensorflow/tensorflow_op_parser.h" | #include "parser/tensorflow/tensorflow_op_parser.h" | ||||
| using domi::tensorflow::NodeDef; | |||||
| namespace ge { | namespace ge { | ||||
| class PARSER_FUNC_VISIBILITY TensorFlowRefSwitchParser : public TensorFlowOpParser { | class PARSER_FUNC_VISIBILITY TensorFlowRefSwitchParser : public TensorFlowOpParser { | ||||
| // AUTO GEN PLEASE DO NOT MODIFY IT | // AUTO GEN PLEASE DO NOT MODIFY IT | ||||
| @@ -61,7 +61,7 @@ Status TensorFlowReshapeParser::ParseParams(const Message *op_src, ge::OpDescPtr | |||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const NodeDef *node_src = DOMI_DYNAMIC_CAST<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node_src = DOMI_DYNAMIC_CAST<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GE_CHECK_NOTNULL(node_src); | GE_CHECK_NOTNULL(node_src); | ||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node_src->name().c_str(), node_src->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node_src->name().c_str(), node_src->op().c_str()); | ||||
| domi::tensorflow::AttrValue input_attr_value; | domi::tensorflow::AttrValue input_attr_value; | ||||
| @@ -94,7 +94,7 @@ Status TensorFlowShapeNParser::ParseN(const domi::tensorflow::NodeDef *node, Sha | |||||
| Status TensorFlowShapeNParser::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | Status TensorFlowShapeNParser::ParseParams(const Message *op_src, ge::OpDescPtr &op_dest) { | ||||
| GE_CHECK_NOTNULL(op_dest); | GE_CHECK_NOTNULL(op_dest); | ||||
| const NodeDef *node = DOMI_DYNAMIC_CAST<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = DOMI_DYNAMIC_CAST<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| ShapeNOperator op; | ShapeNOperator op; | ||||
| op.Name(node->name()); | op.Name(node->name()); | ||||
| @@ -20,8 +20,6 @@ | |||||
| #include "common/op_def/shape_n_op.h" | #include "common/op_def/shape_n_op.h" | ||||
| #include "parser/tensorflow/tensorflow_op_parser.h" | #include "parser/tensorflow/tensorflow_op_parser.h" | ||||
| using domi::tensorflow::NodeDef; | |||||
| namespace ge { | namespace ge { | ||||
| class PARSER_FUNC_VISIBILITY TensorFlowShapeNParser : public TensorFlowOpParser { | class PARSER_FUNC_VISIBILITY TensorFlowShapeNParser : public TensorFlowOpParser { | ||||
| // AUTO GEN PLEASE DO NOT MODIFY IT | // AUTO GEN PLEASE DO NOT MODIFY IT | ||||
| @@ -66,7 +66,7 @@ Status TensorFlowSqueezeParser::ParseParams(const Message *op_src, ge::OpDescPtr | |||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
| const NodeDef *node = DOMI_DYNAMIC_CAST<const NodeDef *>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = DOMI_DYNAMIC_CAST<const domi::tensorflow::NodeDef *>(op_src); | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| bool has_axis = true; | bool has_axis = true; | ||||
| @@ -207,7 +207,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY domi::Status TensorFlowUtil::Ch | |||||
| } | } | ||||
| FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY domi::Status TensorFlowUtil::ParseDataType( | FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY domi::Status TensorFlowUtil::ParseDataType( | ||||
| const NodeDef *node_src, const std::string &attr_src, domi::tensorflow::DataType &data_type) { | |||||
| const domi::tensorflow::NodeDef *node_src, const std::string &attr_src, domi::tensorflow::DataType &data_type) { | |||||
| GE_CHECK_NOTNULL(node_src); | GE_CHECK_NOTNULL(node_src); | ||||
| std::string node_name = node_src->name(); | std::string node_name = node_src->name(); | ||||
| @@ -34,11 +34,6 @@ | |||||
| #include "graph/utils/tensor_utils.h" | #include "graph/utils/tensor_utils.h" | ||||
| #include "proto/tensorflow/graph.pb.h" | #include "proto/tensorflow/graph.pb.h" | ||||
| using domi::tensorflow::NodeDef; | |||||
| using domi::tensorflow::FunctionDef; | |||||
| using domi::tensorflow::AttrValue_ListValue; | |||||
| using domi::tensorflow::FunctionDefLibrary; | |||||
| namespace ge { | namespace ge { | ||||
| /***************************TensorFlow attribute type, constant definition*******************************************/ | /***************************TensorFlow attribute type, constant definition*******************************************/ | ||||
| extern const std::string TENSORFLOW_ATTR_TYPE_STRING; | extern const std::string TENSORFLOW_ATTR_TYPE_STRING; | ||||
| @@ -164,7 +159,7 @@ class TensorFlowUtil { | |||||
| * @return FAILED parsing failed | * @return FAILED parsing failed | ||||
| * | * | ||||
| */ | */ | ||||
| static domi::Status ParseDataType(const NodeDef *node_src, | |||||
| static domi::Status ParseDataType(const domi::tensorflow::NodeDef *node_src, | |||||
| const std::string &attr_src, | const std::string &attr_src, | ||||
| domi::tensorflow::DataType &data_type); | domi::tensorflow::DataType &data_type); | ||||
| @@ -25,7 +25,7 @@ using namespace ge::parser; | |||||
| namespace ge { | namespace ge { | ||||
| Status ParseParams(const Message *op_src, VarIsInitializedOpOperator *const op) { | Status ParseParams(const Message *op_src, VarIsInitializedOpOperator *const op) { | ||||
| GE_CHECK_NOTNULL(op_src); | GE_CHECK_NOTNULL(op_src); | ||||
| const NodeDef *node = ge::PtrToPtr<Message, NodeDef>(op_src); | |||||
| const domi::tensorflow::NodeDef *node = ge::PtrToPtr<Message, domi::tensorflow::NodeDef>(op_src); | |||||
| GE_CHECK_NOTNULL(node); | GE_CHECK_NOTNULL(node); | ||||
| GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | GELOGD("TF op node name = %s, op type= %s, parse params", node->name().c_str(), node->op().c_str()); | ||||
| op->Name(node->name()); | op->Name(node->name()); | ||||