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

Method IsLocalTarget

tensorflow/core/common_runtime/function.cc:709–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709bool FunctionLibraryRuntimeImpl::IsLocalTarget(
710 const InstantiateOptions& options) const {
711 if (device_ == nullptr) return true;
712 if (options.target.empty()) return true;
713 if (options.is_multi_device_function) return false;
714 Device* target_device;
715 if (!device_mgr_->LookupDevice(options.target, &target_device).ok()) {
716 VLOG(1) << "Not instantiating function in FLR because failed to "
717 << "find device " << options.target << " in device manager";
718 return false;
719 }
720 if (target_device != device_) {
721 VLOG(1) << "Not instantiating function in FLR because target device "
722 << options.target
723 << " is different from FLR's device: " << device_->DebugString();
724 return false;
725 }
726 return true;
727}
728
729Status FunctionLibraryRuntimeImpl::Instantiate(
730 const string& function_name, AttrSlice attrs,

Callers

nothing calls this directly

Calls 4

LookupDeviceMethod · 0.80
emptyMethod · 0.45
okMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected