diff --git a/metadef b/metadef index c796c53..14cecde 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit c796c53d1971952beb1941fb3699dacc907d9625 +Subproject commit 14cecde0518e5d65fc78fbb5e1e34f209211c57a diff --git a/parser/onnx/onnx_file_constant_parser.cc b/parser/onnx/onnx_file_constant_parser.cc index 0271d11..33698ab 100644 --- a/parser/onnx/onnx_file_constant_parser.cc +++ b/parser/onnx/onnx_file_constant_parser.cc @@ -33,7 +33,7 @@ using namespace ge::parser; namespace { const char *const kAttrShape = "shape"; const char *const kAttrDataType = "dtype"; -const char *const kFileConstantPath = "file_constant_path"; +const char *const kFileConstantPath = "_file_constant_path"; const char *const kLocation = "location"; const char *const kOffset = "offset"; const int64_t kOffsetCoefficient = 4096; diff --git a/tests/ut/parser/testcase/onnx_parser_testcase/onnx_parser_unittest.cc b/tests/ut/parser/testcase/onnx_parser_testcase/onnx_parser_unittest.cc index b944b55..bbec9c0 100644 --- a/tests/ut/parser/testcase/onnx_parser_testcase/onnx_parser_unittest.cc +++ b/tests/ut/parser/testcase/onnx_parser_testcase/onnx_parser_unittest.cc @@ -525,7 +525,7 @@ TEST_F(UtestOnnxParser, FileConstantParsePath) // check location std::string attr_value; ge::NamedAttrs attrs; - AttrUtils::GetNamedAttrs(op_desc_src, "file_constant_path", attrs); + AttrUtils::GetNamedAttrs(op_desc_src, "_file_constant_path", attrs); AttrUtils::GetStr(attrs, "location", attr_value); EXPECT_EQ(attr_value, "/usr/local"); } @@ -567,7 +567,7 @@ TEST_F(UtestOnnxParser, FileConstantParseParam) // check location, shape, dtype NamedAttrs attrs; - AttrUtils::GetNamedAttrs(*op_desc_src, "file_constant_path", attrs); + AttrUtils::GetNamedAttrs(*op_desc_src, "_file_constant_path", attrs); std::string file_path; AttrUtils::GetStr(attrs, "location", file_path); EXPECT_EQ(file_path, "/usr/local");