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

Method add_output

src/opr/impl/io.cpp:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24/* ===================== dv_helper ===================== */
25
26void dv_helper::add_output(
27 cg::OperatorNodeBase& opr, DType dtype, const Maybe<std::string>& name) {
28 mgb_assert(dtype.valid());
29 opr.add_output(name)
30 ->add_flag(VarNode::Flag::NO_MEM_RECLAIM)
31 .add_flag(VarNode::Flag::PERSISTENT_DEVICE_VALUE)
32 .add_flag(VarNode::Flag::DISALLOW_RT_FORCE_DYNAMIC_MEM_ALLOC)
33 .dtype(dtype);
34}
35
36void dv_helper::init_output_mem_plan(
37 const DeviceTensorND& val, cg::OperatorNodeBase& opr, bool dynamic,

Callers 13

TEST_FFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
test_basic_fwd_with_gradFunction · 0.45
TESTFunction · 0.45
test_null_gradFunction · 0.45
test_two_var_coupledFunction · 0.45
sin_by_taylorMethod · 0.45
exp_by_taylorMethod · 0.45
TESTFunction · 0.45

Calls 3

validMethod · 0.45
dtypeMethod · 0.45
emptyMethod · 0.45

Tested by 13

TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
test_basic_fwd_with_gradFunction · 0.36
TESTFunction · 0.36
test_null_gradFunction · 0.36
test_two_var_coupledFunction · 0.36
sin_by_taylorMethod · 0.36
exp_by_taylorMethod · 0.36
TESTFunction · 0.36