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

Method update_mutable_src_shape

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

Source from the content-addressed store, hash-verified

970}
971
972void StaticInferManagerImpl::update_mutable_src_shape(Tag dest) {
973 MGB_LOCK_GUARD(m_mtx);
974 MGB_TRY {
975 auto&& container = get_tag_trait_container(dest);
976 auto handle = container.shape;
977 if (handle && handle->infer_type() == InferType::RT_STATIC &&
978 handle->deps().empty()) {
979 dest->shape(handle->infer(true, false)->shape());
980 }
981 }
982 MGB_CATCH(MegBrainError & exc, { update_rethrow_exc(dest, exc); })
983}
984

Callers 1

Calls 4

infer_typeMethod · 0.80
emptyMethod · 0.45
shapeMethod · 0.45
inferMethod · 0.45

Tested by

no test coverage detected