| 515 | } |
| 516 | |
| 517 | bool EagerContext::OnSameTask(const Device* first, const Device* second) const { |
| 518 | if (first == nullptr) first = HostCPU(); |
| 519 | if (second == nullptr) second = HostCPU(); |
| 520 | return first->parsed_name().job == second->parsed_name().job && |
| 521 | first->parsed_name().replica == second->parsed_name().replica && |
| 522 | first->parsed_name().task == second->parsed_name().task; |
| 523 | } |
| 524 | |
| 525 | // Gets the CPU device on the task of device. |
| 526 | Status EagerContext::CPUDeviceOnTask(const Device* device, |
no outgoing calls
no test coverage detected