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

Method init_output_format

src/opr/impl/tensor_manip.cpp:1599–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1597MEGDNN_OPR_INIT1(RelayoutFormat, "relayout_format")
1598
1599void RelayoutFormat::init_output_format() {
1600 TensorFormat src_fmt = input(0)->format(), dst_fmt;
1601 megdnn_opr()->deduce_format(src_fmt, dst_fmt);
1602 mgb_assert(output().size() == 2);
1603 output(0)->format(dst_fmt);
1604 output(1)->format({}); // default format
1605}
1606// f}}}
1607//
1608

Callers

nothing calls this directly

Calls 3

formatMethod · 0.45
deduce_formatMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected