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

Method RelayoutPlaceholder

src/gopt/impl/tensor_reformat.cpp:91–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89// clang-format on
90
91TensorReformatPass::RelayoutPlaceholder::RelayoutPlaceholder(
92 VarNode* src_var, const ReformatKey& key)
93 : Super(src_var->owner_graph(), {}, "RelayoutPlaceholder", {src_var}),
94 m_key{key} {
95 add_input({src_var});
96 add_equivalence_component<PODHash<ReformatKey>>(&m_key);
97 m_output = ReformatManager::instance().get(m_key)({src_var});
98 add_output(None)->dtype(src_var->dtype());
99}
100
101void TensorReformatPass::RelayoutPlaceholder::scn_do_execute() {
102 mgb_throw(InternalError, "RelayoutPlaceholder opr can not be executed");

Callers

nothing calls this directly

Calls 3

owner_graphMethod · 0.45
getMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected