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

Function is_opr_mutable

src/core/impl/graph/eager_eval.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace {
18
19bool is_opr_mutable(OperatorNodeBase* opr) {
20 for (auto&& i : opr->input()) {
21 if (!is_const_var_value(i)) {
22 return true;
23 }
24 }
25 for (auto&& i : opr->output()) {
26 if (!i->contain_flag(VarNode::Flag::VOLATILE_CONTENT) &&
27 !is_const_var_value(i)) {
28 return true;
29 }
30 }
31 return false;
32}
33
34} // namespace
35

Callers 1

check_versionMethod · 0.85

Calls 4

is_const_var_valueFunction · 0.85
inputMethod · 0.45
outputMethod · 0.45
contain_flagMethod · 0.45

Tested by

no test coverage detected