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

Method SetSubtensor

src/opr/impl/tensor_manip.cpp:783–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781/* f{{{ ======================= SetSubtensor ======================= */
782
783SetSubtensor::SetSubtensor(
784 VarNode* inp, VarNode* value, const IndexDesc& desc,
785 const OperatorNodeConfig& config,
786 const InputTensorReplacer& input_tensor_replacer)
787 : Super({inp->owner_graph(), config, "set_subtensor", {inp, value}}, inp, value,
788 desc, true, input_tensor_replacer) {
789 output(0)->add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE);
790}
791
792SymbolVar SetSubtensor::make(
793 SymbolVar inp, SymbolVar value, const IndexDesc& desc,

Callers 2

test_subtensorFunction · 0.80
set_subtensorFunction · 0.80

Calls 1

owner_graphMethod · 0.45

Tested by 2

test_subtensorFunction · 0.64
set_subtensorFunction · 0.64