| 114 | } |
| 115 | |
| 116 | void remove_layout(module& m) |
| 117 | { |
| 118 | for(auto ins : iterator_for(m)) |
| 119 | { |
| 120 | if(ins->name() != "layout") |
| 121 | continue; |
| 122 | auto perm = ins->get_operator().to_value()["permutation"].to_vector<std::int64_t>(); |
| 123 | auto iperm = find_permutation(ins->inputs().front()->get_shape()); |
| 124 | if(perm != iperm) |
| 125 | continue; |
| 126 | m.replace_instruction(ins, ins->inputs().front()); |
| 127 | } |
| 128 | } |
| 129 | } // namespace |
| 130 | |
| 131 | void layout_convolution::apply(module_pass_manager& mpm) const |
no test coverage detected