| 13 | |
| 14 | namespace { |
| 15 | inline void deduce_reformat_layout( |
| 16 | std::unique_ptr<RelayoutFormat>& relayout, const TensorLayout& src_layout, |
| 17 | TensorLayout& dst_layout, RelayoutFormat::Param::Mode mode, const int oc = 0, |
| 18 | const int group = 1) { |
| 19 | if (src_layout.ndim > 0) { |
| 20 | RelayoutFormat::Param trans_param; |
| 21 | trans_param.mode = mode; |
| 22 | trans_param.oc = oc; |
| 23 | trans_param.group = group; |
| 24 | relayout->param() = trans_param; |
| 25 | relayout->deduce_layout(src_layout, dst_layout); |
| 26 | } else { |
| 27 | dst_layout = src_layout; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | void get_inner_layout( |
| 32 | const TensorLayout& src, const TensorLayout& dst, TensorLayout& inner_src, |
no test coverage detected