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 #include "transform/graph_ir/io_format_map.h"
18
19 namespace mindspore {
20 namespace transform {
21 std::unordered_map<std::string, std::string> IOFormatMap::io_format_map_ = {{"BasicLSTMCell", "ND"},
22 {"BasicLSTMCellInputGrad", "ND"},
23 {"BasicLSTMCellCStateGrad", "ND"},
24 {"Dequant", "ND"},
25 {"DynamicGRUV2", "ND"},
26 {"DynamicGRUV2Grad", "ND"},
27 {"DynamicRNN", "ND"},
28 {"DynamicRNNGrad", "ND"},
29 {"MatMul", "ND"},
30 {"Quant", "ND"},
31 {"BasicLSTMCellWeightGrad", "HWCN"},
32 {"ExtractImagePatches", "NCHW"},
33 {"Conv3D", "format"},
34 {"Conv3DBackpropFilter", "format"},
35 {"Conv3DBackpropInput", "format"},
36 {"Conv3DTranspose", "format"}};
get()37 std::unordered_map<std::string, std::string> &IOFormatMap::get() { return io_format_map_; }
38 } // namespace transform
39 } // namespace mindspore
40