| 213 | } |
| 214 | |
| 215 | void EagerEvalManager::update_static_infer_result(OperatorNodeBase* opr) { |
| 216 | auto&& mgr = |
| 217 | ComputingGraphImpl::downcast(m_owner_graph)->static_infer_manager_impl(); |
| 218 | auto sync_missing_trait = |
| 219 | [&](static_infer::StaticInferManagerImpl::TagHandler* handler) { |
| 220 | auto&& missing = mgr.get_missing_inp(handler); |
| 221 | for (auto i : missing) { |
| 222 | i->sync_from_var(); |
| 223 | } |
| 224 | }; |
| 225 | |
| 226 | // set missing shapes/values for output shape infer |
| 227 | using InferType = static_infer::InferType; |
| 228 | for (auto var : opr->output()) { |
| 229 | auto type = mgr.get_infer_type(var); |
| 230 | if (type.shape & InferType::MISSING_INP) { |
| 231 | sync_missing_trait(mgr.get_tag_handler_for_shape(var)); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | // force udpate mutable src |
| 236 | for (auto&& i : opr->output()) { |
| 237 | if (i->contain_flag(VarNode::Flag::VOLATILE_CONTENT)) |
| 238 | continue; |
| 239 | mgr.update_mutable_src_shape(i); |
| 240 | } |
| 241 | |
| 242 | // set missing shapes/values for input value infer |
| 243 | for (auto&& dep : opr->node_prop().dep_map()) { |
| 244 | using Type = OperatorNodeBase::NodeProp::DepType; |
| 245 | if ((dep.second & Type::HOST_VALUE) && !is_static_var_value(dep.first)) { |
| 246 | sync_missing_trait(mgr.get_tag_handler_for_value(dep.first)); |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | void EagerEvalManager::ensure_input_layout(VarNode* var) { |
| 252 | auto&& mem_mgr = |
nothing calls this directly
no test coverage detected