Gets the CPU device on the task of device.
| 524 | |
| 525 | // Gets the CPU device on the task of device. |
| 526 | Status EagerContext::CPUDeviceOnTask(const Device* device, |
| 527 | Device** cpu_device) const { |
| 528 | string cpu_device_name; |
| 529 | TF_RETURN_IF_ERROR(DeviceNameUtils::DeviceNameToCpuDeviceName( |
| 530 | device->name(), &cpu_device_name)); |
| 531 | |
| 532 | return FindDeviceByName(cpu_device_name, cpu_device); |
| 533 | } |
| 534 | |
| 535 | namespace { |
| 536 | Status GetTaskName(Device* d, string* task_name) { |
no test coverage detected