| 707 | } |
| 708 | |
| 709 | bool 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 | |
| 729 | Status FunctionLibraryRuntimeImpl::Instantiate( |
| 730 | const string& function_name, AttrSlice attrs, |
nothing calls this directly
no test coverage detected