1 | /******************************************************************************* |
2 | * Copyright 2021-2022 Intel Corporation |
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 COMMON_SERIALIZATION_HPP |
18 | #define COMMON_SERIALIZATION_HPP |
19 | |
20 | #include "common/c_types_map.hpp" |
21 | #include "common/primitive_attr.hpp" |
22 | #include "common/serialization_stream.hpp" |
23 | #include "common/type_helpers.hpp" |
24 | #include "oneapi/dnnl/dnnl.h" |
25 | |
26 | namespace dnnl { |
27 | namespace impl { |
28 | namespace serialization { |
29 | |
30 | void serialize_attr( |
31 | serialization_stream_t &sstream, const primitive_attr_t &attr); |
32 | void serialize_md(serialization_stream_t &sstream, const memory_desc_t &md); |
33 | void serialize_desc(serialization_stream_t &sstream, const concat_desc_t &desc); |
34 | void serialize_desc(serialization_stream_t &sstream, |
35 | const batch_normalization_desc_t &desc); |
36 | void serialize_desc(serialization_stream_t &sstream, const binary_desc_t &desc); |
37 | void serialize_desc( |
38 | serialization_stream_t &sstream, const convolution_desc_t &desc); |
39 | void serialize_desc( |
40 | serialization_stream_t &sstream, const eltwise_desc_t &desc); |
41 | void serialize_desc(serialization_stream_t &sstream, const gemm_desc_t &desc); |
42 | void serialize_desc( |
43 | serialization_stream_t &sstream, const inner_product_desc_t &desc); |
44 | void serialize_desc(serialization_stream_t &sstream, |
45 | const layer_normalization_desc_t &desc); |
46 | void serialize_desc(serialization_stream_t &sstream, const lrn_desc_t &desc); |
47 | void serialize_desc(serialization_stream_t &sstream, const matmul_desc_t &desc); |
48 | void serialize_desc( |
49 | serialization_stream_t &sstream, const pooling_desc_t &desc); |
50 | void serialize_desc(serialization_stream_t &sstream, const prelu_desc_t &desc); |
51 | void serialize_desc( |
52 | serialization_stream_t &sstream, const reduction_desc_t &desc); |
53 | void serialize_desc( |
54 | serialization_stream_t &sstream, const reorder_desc_t &desc); |
55 | void serialize_desc( |
56 | serialization_stream_t &sstream, const resampling_desc_t &desc); |
57 | void serialize_desc(serialization_stream_t &sstream, const rnn_desc_t &desc); |
58 | void serialize_desc( |
59 | serialization_stream_t &sstream, const shuffle_desc_t &desc); |
60 | void serialize_desc( |
61 | serialization_stream_t &sstream, const softmax_desc_t &desc); |
62 | void serialize_desc(serialization_stream_t &sstream, const sum_desc_t &desc); |
63 | |
64 | status_t serialize_desc( |
65 | serialization_stream_t &sstream, const op_desc_t *op_desc); |
66 | |
67 | } // namespace serialization |
68 | } // namespace impl |
69 | } // namespace dnnl |
70 | |
71 | #endif |
72 | |