| 568 | } |
| 569 | |
| 570 | void Actor::AsyncLaunchKernel(std::function<Regst*(int64_t)> Regst4RegstDescId) { |
| 571 | for (const ExecKernel& ek : exec_kernel_vec_) { |
| 572 | CHECK_NOTNULL(dynamic_cast<KernelContextImpl*>(ek.kernel_ctx.get())) |
| 573 | ->UpdateBnInOp2BlobFn([&](const std::string& bn_in_op) -> Blob* { |
| 574 | const auto blob_info_it = ek.bn_in_op2blob_info.find(bn_in_op); |
| 575 | if (blob_info_it == ek.bn_in_op2blob_info.cend()) { return nullptr; } |
| 576 | const BlobInfo& info = blob_info_it->second; |
| 577 | if (info.regst_desc_id == -1) { return nullptr; } |
| 578 | Regst* regst = nullptr; |
| 579 | if (info.rs != nullptr) { |
| 580 | regst = info.rs->Front(info.regst_desc_id); |
| 581 | } else { |
| 582 | regst = Regst4RegstDescId(info.regst_desc_id); |
| 583 | } |
| 584 | if (regst == nullptr) { return nullptr; } |
| 585 | if (info.ordinal >= 0) { |
| 586 | return regst->GetBlobByOrdinal(info.ordinal); |
| 587 | } else { |
| 588 | return regst->GetBlobByLbi(info.lbi); |
| 589 | } |
| 590 | }); |
| 591 | ek.kernel->Launch(ek.kernel_ctx.get()); |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | void Actor::AsyncLaunchKernel() { |
| 596 | AsyncLaunchKernel([](int64_t) -> Regst* { |
nothing calls this directly
no test coverage detected