1 /** 2 * Copyright 2023 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_LITERT_PASS_FORMAT_PASS_FORMAT_UTILS_H_ 18 #define MINDSPORE_LITE_SRC_LITERT_PASS_FORMAT_PASS_FORMAT_UTILS_H_ 19 20 #include <string> 21 #include <unordered_map> 22 #include <vector> 23 24 namespace mindspore::lite::pass { 25 static const std::unordered_map<std::string, std::vector<size_t>> cloud_format_kernel_list = { 26 {"AvgPool", {0}}, 27 {"AvgPoolFusion", {0}}, 28 {"MaxPool", {0}}, 29 {"MaxPoolFusion", {0}}, 30 {"BatchNorm", {0}}, 31 {"BatchNormWithActivation", {0}}, 32 {"BatchNormWithAddAndActivation", {0}}, 33 {"BatchToSpace", {0}}, 34 {"Conv2D", {0, 1}}, 35 {"Conv2DFusion", {0, 1}}, 36 {"Conv2DTranspose", {0, 1}}, 37 {"Conv2dTransposeFusion", {0, 1}}, 38 {"DepthToSpace", {0}}, 39 {"FusedBatchNorm", {0}}, 40 {"InstanceNorm", {0}}, 41 {"LRN", {0}}, 42 {"PReLU", {0}}, 43 {"Resize", {0}}, 44 {"ROIPooling", {0}}, 45 {"SGD", {0}}, 46 {"SpaceToBatch", {0}}, 47 {"SpaceToBatchND", {0}}, 48 {"SpaceToDepth", {0}}, 49 }; 50 } // namespace mindspore::lite::pass 51 #endif // MINDSPORE_LITE_SRC_EXTENDRT_NNACL_FORMAT_PASS_H_ 52