MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / on_graph_endpoint_var

Method on_graph_endpoint_var

src/gopt/impl/tensor_reformat.cpp:190–199  ·  view source on GitHub ↗

================ EnableTensorCorePass =============== */

Source from the content-addressed store, hash-verified

188
189/* ================ EnableTensorCorePass =============== */
190VarNode* EnableTensorCorePass::on_graph_endpoint_var(
191 VarNode* new_var, VarNode* orig_var) const {
192 if (!orig_var->shape().eq_shape(new_var->shape())) {
193 return RelayoutPlaceholder::make(
194 new_var,
195 ReformatKey{TensorFormats::NCHWc32, TensorFormats::NCHWc4})
196 .node();
197 }
198 return new_var;
199}
200
201VarNode* EnableTensorCorePass::trans_to_nchw32(VarNode* new_inp) {
202 const TensorShape& shape = new_inp->shape();

Callers

nothing calls this directly

Calls 14

makeFunction · 0.50
MGB_CATCHFunction · 0.50
eq_shapeMethod · 0.45
shapeMethod · 0.45
nodeMethod · 0.45
countMethod · 0.45
findMethod · 0.45
owner_oprMethod · 0.45
endMethod · 0.45
cnameMethod · 0.45
enumvMethod · 0.45

Tested by

no test coverage detected