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_TOOLS_CONVERTER_ADAPTER_ACL_COMMON_ACL_TYPES_H_ 18 #define MINDSPORE_LITE_TOOLS_CONVERTER_ADAPTER_ACL_COMMON_ACL_TYPES_H_ 19 20 #include <string> 21 #include <vector> 22 #include <map> 23 #include <memory> 24 #include "include/api/data_type.h" 25 #include "include/api/context.h" 26 27 namespace mindspore { 28 namespace lite { 29 namespace acl { 30 struct AclModelOptionCfg { 31 bool offline; 32 int32_t device_id = 0; 33 int32_t rank_id = 0; 34 DataType output_type; 35 std::vector<size_t> dynamic_batch_size; 36 std::map<int32_t, std::vector<int32_t>> input_shape_map; 37 std::string input_format; 38 std::string input_shape; 39 std::string precision_mode; 40 std::string op_select_impl_mode; 41 std::string fusion_switch_config_file_path; 42 std::string buffer_optimize; 43 std::string insert_op_config_file_path; 44 std::string dynamic_image_size; 45 std::string dynamic_dims; 46 std::string om_file_path; 47 std::string aoe_mode; 48 std::string profiling_path; 49 std::string dump_path; 50 std::string dump_model_name; 51 std::string custom_opp_path; 52 std::vector<std::string> plugin_custom_ops; 53 std::map<std::string, std::vector<std::string>> enable_custom_fusion_pattern; 54 std::map<std::string, std::vector<std::string>> disable_custom_fusion_pattern; 55 std::map<std::string, std::string> init_options_map; 56 std::map<std::string, std::string> build_options_map; 57 std::map<std::string, std::string> aoe_global_options_map; 58 std::map<std::string, std::string> aoe_tuning_options_map; 59 std::map<std::string, std::map<std::string, std::string>> op_attrs_map; 60 }; 61 } // namespace acl 62 } // namespace lite 63 } // namespace mindspore 64 65 #endif // MINDSPORE_LITE_TOOLS_CONVERTER_ADAPTER_ACL_COMMON_ACL_TYPES_H_ 66