From 5e95a9bfa804dec158066953fca68ff20e76d302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B1=AA?= Date: Thu, 17 Nov 2022 13:18:09 +0000 Subject: [PATCH] =?UTF-8?q?!733=20=E7=94=A8=E2=80=9C=5F=E2=80=9D=E4=BF=AE?= =?UTF-8?q?=E9=A5=B0=E5=86=85=E9=83=A8=E5=B1=9E=E6=80=A7file=5Fconstant=5F?= =?UTF-8?q?path=20Merge=20pull=20request=20!733=20from=20=E5=88=98?= =?UTF-8?q?=E8=B1=AA/add=5Ffileconstant=5Fattr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadef | 2 +- parser/onnx/onnx_file_constant_parser.cc | 2 +- tests/ut/parser/testcase/onnx_parser_testcase/onnx_parser_unittest.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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");