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

Method prepare_inp_val

src/core/impl/graph/static_infer_impl.cpp:1403–1417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403InpVal StaticInferManagerImpl::SubgraphStaticInferHelperImpl::prepare_inp_val(
1404 const TagTraitArray& deps) {
1405 mgb_assert(!deps.empty());
1406 InpVal finp;
1407 for (auto i : deps) {
1408 auto t = i->infer(false, true);
1409 if (!t) {
1410 finp.val.clear();
1411 return finp;
1412 }
1413 finp.val.push_back(*t);
1414 finp.run_id += i->infer_result_version();
1415 }
1416 return finp;
1417}
1418
1419bool StaticInferManagerImpl::SubgraphStaticInferHelperImpl::infer_shape_raw(
1420 const TagTraitArray& deps, const ShapeInferDesc::infer_func_t& func,

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
inferMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected