MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / remove_layout

Function remove_layout

src/layout_convolution.cpp:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void 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
131void layout_convolution::apply(module_pass_manager& mpm) const

Callers 1

applyMethod · 0.85

Calls 8

iterator_forFunction · 0.85
frontMethod · 0.80
replace_instructionMethod · 0.80
find_permutationFunction · 0.70
nameMethod · 0.45
to_valueMethod · 0.45
get_shapeMethod · 0.45
inputsMethod · 0.45

Tested by

no test coverage detected