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

Function infer_withoutexc

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

Source from the content-addressed store, hash-verified

140 }
141
142 const InpElement* infer_withoutexc(
143 VarNode** cur_active_var, bool recomp_mutable_srcnode) override {
144 InpElement* ret;
145 {
146 // thread_local not supported on ios; so we us a manual impl
147 MGB_LOCK_GUARD(sm_result_cache.mtx);
148#if __DEPLOY_ON_XP_SP2__
149 ret = &sm_result_cache.storage[0];
150#else
151 ret = &sm_result_cache.storage[std::this_thread::get_id()];
152#endif
153 }
154 ret->m_shape = &tag()->shape();
155 return ret;
156 }
157
158 TagTraitArray& deps() const override { return sm_empty_deps; }
159};

Callers 1

inferMethod · 0.85

Calls 1

shapeMethod · 0.45

Tested by

no test coverage detected