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

Method check_input_unmodified

src/plugin/impl/var_sanity_check.cpp:215–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void VarSanityCheck::check_input_unmodified(
216 cg::OperatorNodeBase* recv_opr, VarNode* var) {
217 auto ptr = var->dev_tensor().raw_ptr();
218 for (auto i : recv_opr->output()) {
219 if (i->dev_tensor_valid() && i->dev_tensor().raw_ptr() == ptr)
220 return;
221 }
222 check_single_input(false, recv_opr, var);
223}
224
225void VarSanityCheck::check_single_input(
226 bool add_debug_log, cg::OperatorNodeBase* recv_opr, VarNode* var) {

Callers

nothing calls this directly

Calls 4

dev_tensor_validMethod · 0.80
raw_ptrMethod · 0.45
dev_tensorMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected