| 429 | } |
| 430 | |
| 431 | void NetworkImplDft::cross_compnode_model_detect() { |
| 432 | mgb::ThinHashSet<LiteDeviceType> nr_used_device_type; |
| 433 | auto on_opr = [&](mgb::cg::OperatorNodeBase* opr) { |
| 434 | for (auto j : opr->output()) { |
| 435 | if (j->comp_node() != mgb::CompNode::default_cpu()) { |
| 436 | nr_used_device_type.insert( |
| 437 | get_device_from_locator(j->comp_node().locator())); |
| 438 | } |
| 439 | } |
| 440 | }; |
| 441 | mgb::cg::DepOprIter dep_iter{on_opr}; |
| 442 | for (auto i : m_load_result.output_var_list) { |
| 443 | dep_iter.add(i.node()->owner_opr()); |
| 444 | } |
| 445 | m_nr_device_type = nr_used_device_type.size(); |
| 446 | } |
| 447 | |
| 448 | void NetworkImplDft::layout_transform_optimization() { |
| 449 | if (m_set_layout_transform) { |