From a2047b6e0dbd6f434e625b8cf9cf5cdd831fc21d Mon Sep 17 00:00:00 2001 From: dajunli Date: Tue, 8 Dec 2020 21:01:19 +0800 Subject: [PATCH 1/4] change code --- .vscode/settings.json | 57 ++++++++++++++++++++++++++++++++++++ parser/caffe/caffe_parser.cc | 6 ++-- 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d981837 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,57 @@ +{ + "files.associations": { + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "array": "cpp", + "atomic": "cpp", + "strstream": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "chrono": "cpp", + "complex": "cpp", + "condition_variable": "cpp", + "cstdint": "cpp", + "deque": "cpp", + "list": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "ratio": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "memory": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "numeric": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "cfenv": "cpp", + "cinttypes": "cpp", + "utility": "cpp", + "typeindex": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/parser/caffe/caffe_parser.cc b/parser/caffe/caffe_parser.cc index 28fafbd..18b5d9e 100644 --- a/parser/caffe/caffe_parser.cc +++ b/parser/caffe/caffe_parser.cc @@ -202,9 +202,9 @@ const char *const kFieldInnerPro = "inner_product_param"; const char *const kFieldDim = "dim"; const char *const kFieldBiasTerm = "bias_term"; const char *const kDevNull = "/dev/null"; -const char* const kMessage = "message"; -const char* const kLayerParameter = "LayerParameter"; -const char* const kCloseBrace = "}"; +const std::string kMessage = "message"; +const std::string kLayerParameter = "LayerParameter"; +const std::string kCloseBrace = "}"; const std::string kOptional = "optional"; const std::string kRepeated = "repeated"; const std::string kRequired = "required"; From a2c7c82b7b28af26bb7e85591cb002dc7d5d2f12 Mon Sep 17 00:00:00 2001 From: dajunli Date: Tue, 8 Dec 2020 21:01:56 +0800 Subject: [PATCH 2/4] change code --- .vscode/settings.json | 57 ------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index d981837..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "files.associations": { - "cctype": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "array": "cpp", - "atomic": "cpp", - "strstream": "cpp", - "*.tcc": "cpp", - "bitset": "cpp", - "chrono": "cpp", - "complex": "cpp", - "condition_variable": "cpp", - "cstdint": "cpp", - "deque": "cpp", - "list": "cpp", - "unordered_map": "cpp", - "vector": "cpp", - "exception": "cpp", - "algorithm": "cpp", - "functional": "cpp", - "ratio": "cpp", - "system_error": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "fstream": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "memory": "cpp", - "mutex": "cpp", - "new": "cpp", - "ostream": "cpp", - "numeric": "cpp", - "sstream": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "thread": "cpp", - "cfenv": "cpp", - "cinttypes": "cpp", - "utility": "cpp", - "typeindex": "cpp", - "typeinfo": "cpp" - } -} \ No newline at end of file From 7822f5801d76882f332a910b030ddd3e9c3dabba Mon Sep 17 00:00:00 2001 From: dajunli Date: Fri, 11 Dec 2020 15:29:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B8=85=E7=90=86Parser=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/common/parser_utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser/common/parser_utils.h b/parser/common/parser_utils.h index 1be6d70..6c19fb7 100644 --- a/parser/common/parser_utils.h +++ b/parser/common/parser_utils.h @@ -31,7 +31,8 @@ class ParserUtils { static Status HandleInputContext(const NodePtr &node, const std::vector &input_nodes, const ComputeGraphPtr &compute_graph); - static Status HandleOutputContext(const NodePtr &node, const std::vector> &out_node_index); + static Status HandleOutputContext(const NodePtr &node, + const std::vector> &out_node_index); }; } // namespace ge #endif // PARSER_COMMON_PARSER_UTILS_H_ From 44b080a25219daaa6087391c52ca16c6ca054c45 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Thu, 10 Dec 2020 19:59:28 +0800 Subject: [PATCH 4/4] Profiling remove ge_prof.h --- parser/stub/gen_stubapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/stub/gen_stubapi.py b/parser/stub/gen_stubapi.py index c729e6f..4acf2c5 100644 --- a/parser/stub/gen_stubapi.py +++ b/parser/stub/gen_stubapi.py @@ -71,7 +71,7 @@ max_code_len_per_line = 100 when DEBUG on """ white_list_for_debug = ["attr_value.h", "operator.h", "tensor.h", "graph.h", "operator_factory.h", - "ge_ir_build.h", "ge_api.h", "ge_prof.h", "tensorflow_parser.h", "caffe_parser.h"] + "ge_ir_build.h", "ge_api.h", "tensorflow_parser.h", "caffe_parser.h"] include_dir_key_words = ["ge", "graph", "parser"] DEBUG = True