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

Method IsLocalDeviceName

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

Source from the content-addressed store, hash-verified

544} // namespace
545
546bool EagerContext::IsLocalDeviceName(
547 const DeviceNameUtils::ParsedName& device_name) const {
548 if ((!device_name.has_job && !device_name.has_replica &&
549 !device_name.has_task) ||
550 remote_device_mgr() == nullptr)
551 return true;
552 auto& host_cpu_name = HostCPU()->parsed_name();
553 return device_name.job == host_cpu_name.job &&
554 device_name.replica == host_cpu_name.replica &&
555 device_name.task == host_cpu_name.task;
556}
557
558#if !defined(IS_MOBILE_PLATFORM)
559Status EagerContext::GetClient(Device* device, eager::EagerClient** client) {

Callers 1

EagerExecuteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected