1 | /******************************************************************************* |
2 | * Copyright 2019-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 | #include "concat/concat.hpp" |
18 | #include "dnnl_debug.hpp" |
19 | |
20 | namespace concat { |
21 | |
22 | std::ostream &operator<<(std::ostream &s, const prb_t &prb) { |
23 | using ::operator<<; |
24 | |
25 | dump_global_params(s); |
26 | settings_t def; |
27 | |
28 | bool has_default_tags = true; |
29 | for (const auto &i_stag : prb.stag) |
30 | has_default_tags = has_default_tags && i_stag == tag::abx; |
31 | |
32 | if (canonical || prb.sdt != def.sdt[0]) s << "--sdt=" << prb.sdt << " " ; |
33 | if (canonical || (prb.dtag != def.dtag[0] && prb.ddt != def.ddt[0])) |
34 | s << "--ddt=" << prb.ddt << " " ; |
35 | if (canonical || !has_default_tags) s << "--stag=" << prb.stag << " " ; |
36 | if (canonical || prb.dtag != def.dtag[0]) s << "--dtag=" << prb.dtag << " " ; |
37 | if (canonical || prb.axis != def.axis[0]) s << "--axis=" << prb.axis << " " ; |
38 | |
39 | s << prb.attr; |
40 | if (canonical || prb.ctx_init != def.ctx_init[0]) |
41 | s << "--ctx-init=" << prb.ctx_init << " " ; |
42 | if (canonical || prb.ctx_exe != def.ctx_exe[0]) |
43 | s << "--ctx-exe=" << prb.ctx_exe << " " ; |
44 | |
45 | s << static_cast<prb_vdims_t>(prb); |
46 | |
47 | return s; |
48 | } |
49 | |
50 | } // namespace concat |
51 | |