1 /** 2 * Copyright 2021 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MINDSPORE_LITE_SRC_COMMON_CONFIG_FILE_H_ 18 #define MINDSPORE_LITE_SRC_COMMON_CONFIG_FILE_H_ 19 20 #include <limits.h> 21 #include <string.h> 22 #include <cstdio> 23 #include <cstdlib> 24 #include <iostream> 25 #include <memory> 26 #include <fstream> 27 #include <string> 28 #include <map> 29 #include <vector> 30 #include <utility> 31 #include "src/common/utils.h" 32 #include "src/common/log_adapter.h" 33 #include "src/common/config_infos.h" 34 #include "ir/dtype/type_id.h" 35 36 namespace mindspore { 37 namespace lite { 38 constexpr int MAX_CONFIG_FILE_LENGTH = 1024; 39 40 int GetAllSectionInfoFromConfigFile(const std::string &file, ConfigInfos *config); 41 42 void ParserExecutionPlan(const std::map<std::string, std::string> *config_infos, 43 std::map<std::string, TypeId> *data_type_plan); 44 45 } // namespace lite 46 } // namespace mindspore 47 48 #endif // MINDSPORE_LITE_SRC_COMMON_CONFIG_FILE_H_ 49