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

Method Subtensor

src/opr/impl/tensor_manip.cpp:626–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624/* f{{{ ======================= Subtensor ======================= */
625
626Subtensor::Subtensor(
627 VarNode* inp, const IndexDesc& desc, const OperatorNodeConfig& config)
628 : Super({inp->owner_graph(), config, "subtensor", {inp}}, inp, nullptr, desc,
629 true) {
630 output(0)->add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE);
631}
632
633SymbolVar Subtensor::make(
634 SymbolVar inp, const IndexDesc& desc, const OperatorNodeConfig& config) {

Callers 5

_subtensorFunction · 0.80
utils.pyFile · 0.80
_subtensorFunction · 0.80
test_subtensorFunction · 0.80
subtensorFunction · 0.80

Calls 1

owner_graphMethod · 0.45

Tested by 2

test_subtensorFunction · 0.64
subtensorFunction · 0.64