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

Method call_register_for_value

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

Source from the content-addressed store, hash-verified

1383}
1384
1385bool StaticInferManagerImpl::SubgraphStaticInferHelperImpl::call_register_for_value(
1386 Tag dest, const ValueInferDesc& desc, RegisterHelperPtr helper) {
1387 mgb_assert(desc.src_type == SourceType::DEP);
1388
1389 auto callback = [&](StaticInferManagerImpl& mgr, SourceType src_type,
1390 const TagTraitArray& deps) -> TagTraitBase* {
1391 using namespace std::placeholders;
1392 auto f = std::bind(
1393 &SubgraphStaticInferHelperImpl::infer_value_raw, deps, desc.infer_func,
1394 _1, _2);
1395
1396 mgr.register_value_infer(dest, {src_type, {}, f});
1397 return mgr.get_tag_trait_container(dest).value;
1398 };
1399
1400 return (this->*helper)(dest, desc.deps, callback);
1401}
1402
1403InpVal StaticInferManagerImpl::SubgraphStaticInferHelperImpl::prepare_inp_val(
1404 const TagTraitArray& deps) {

Callers

nothing calls this directly

Calls 1

register_value_inferMethod · 0.45

Tested by

no test coverage detected