MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CPUDeviceOnTask

Method CPUDeviceOnTask

tensorflow/core/common_runtime/eager/context.cc:526–533  ·  view source on GitHub ↗

Gets the CPU device on the task of device.

Source from the content-addressed store, hash-verified

524
525// Gets the CPU device on the task of device.
526Status 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
535namespace {
536Status GetTaskName(Device* d, string* task_name) {

Callers 1

EagerRemoteExecuteFunction · 0.80

Calls 1

nameMethod · 0.65

Tested by

no test coverage detected