1 | /** |
2 | * Copyright (c) Glow Contributors. See CONTRIBUTORS file. |
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 | Error ONNXModelWriter::writeCPUMaxSplat(const CPUMaxSplatNode *node, |
18 | GraphType &graph) { |
19 | auto *proto = graph.add_node(); |
20 | // Add dictionary entries. |
21 | addValueAttribute(proto, "value" , node->getSplatValue()); |
22 | |
23 | return writeAllWithNode("CPUMaxSplat" , node, graph, proto); |
24 | } |
25 | |
26 | Error ONNXModelWriter::writeCPUConvDKKC8(const CPUConvDKKC8Node *node, |
27 | GraphType &graph) { |
28 | auto *proto = graph.add_node(); |
29 | // Add dictionary entries. |
30 | addValueAttribute(proto, "kernel_shape" , node->getKernels()); |
31 | addValueAttribute(proto, "strides" , node->getStrides()); |
32 | addValueAttribute(proto, "pads" , node->getPads()); |
33 | addValueAttribute(proto, "group" , node->getGroup()); |
34 | |
35 | return writeAllWithNode("CPUConvDKKC8" , node, graph, proto); |
36 | } |
37 | |