Home
last modified time | relevance | path

Searched refs:parsed_name (Results 1 – 25 of 39) sorted by relevance

12

/external/tensorflow/tensorflow/core/grappler/costs/
Dvirtual_placer.cc64 DeviceNameUtils::ParsedName parsed_name; in VirtualPlacer() local
65 bool parsed = DeviceNameUtils::ParseFullName(lfqn, &parsed_name); in VirtualPlacer()
69 const auto type = absl::AsciiStrToLower(parsed_name.type); in VirtualPlacer()
71 gpu_devices[parsed_name.id] = cluster_device_name; in VirtualPlacer()
73 cpu_devices[parsed_name.id] = cluster_device_name; in VirtualPlacer()
95 DeviceNameUtils::ParsedName parsed_name; in VirtualPlacer() local
96 bool parsed = DeviceNameUtils::ParseFullName(lfqn, &parsed_name); in VirtualPlacer()
97 if (parsed && !parsed_name.job.empty()) { in VirtualPlacer()
98 job_names_from_cluster.insert(parsed_name.job); in VirtualPlacer()
143 DeviceNameUtils::ParsedName parsed_name; in to_lfqn_or_empty() local
[all …]
Dutils.cc393 DeviceNameUtils::ParsedName parsed_name; in GetDeviceClassForNonChannelDevice() local
394 bool parsed = DeviceNameUtils::ParseFullName(device_name, &parsed_name); in GetDeviceClassForNonChannelDevice()
404 parsed = DeviceNameUtils::ParseFullName(name, &parsed_name); in GetDeviceClassForNonChannelDevice()
407 const string jobname = parsed_name.has_job ? parsed_name.job : ""; in GetDeviceClassForNonChannelDevice()
408 return absl::StrCat("/", jobname, "/", parsed_name.type); in GetDeviceClassForNonChannelDevice()
/external/tensorflow/tensorflow/core/common_runtime/
Drenamed_device.cc31 DeviceNameUtils::ParsedName parsed_name; in NewRenamedDevice() local
32 CHECK(DeviceNameUtils::ParseFullName(new_base, &parsed_name)); in NewRenamedDevice()
34 underlying->parsed_name(); in NewRenamedDevice()
37 parsed_name.type = underlying_parsed_name.type; in NewRenamedDevice()
38 parsed_name.id = underlying_parsed_name.id; in NewRenamedDevice()
39 string name = DeviceNameUtils::FullName(parsed_name.job, parsed_name.replica, in NewRenamedDevice()
40 parsed_name.task, parsed_name.type, in NewRenamedDevice()
41 parsed_name.id); in NewRenamedDevice()
Ddynamic_device_mgr.cc132 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in AddDevices()
137 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in AddDevices()
165 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in RemoveDevices()
170 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in RemoveDevices()
Dcollective_param_resolver_local.cc259 DeviceNameUtils::ParsedName parsed_name; in ParseRingOrder() local
261 if (!DeviceNameUtils::ParseFullName(dr->device, &parsed_name)) { in ParseRingOrder()
264 auto rank_it = gpu_ranks.find(parsed_name.id); in ParseRingOrder()
292 DeviceNameUtils::ParsedName parsed_name; in OrderTaskDeviceMap() local
293 CHECK(DeviceNameUtils::ParseFullName(next_device, &parsed_name)); in OrderTaskDeviceMap()
312 if (parsed_name.type == "GPU") { in OrderTaskDeviceMap()
314 parsed_name.id = il.device_id(); in OrderTaskDeviceMap()
316 DeviceNameUtils::ParsedNameToString(parsed_name); in OrderTaskDeviceMap()
333 parsed_name.id = best_link->device_id(); in OrderTaskDeviceMap()
334 next_device = DeviceNameUtils::ParsedNameToString(parsed_name); in OrderTaskDeviceMap()
Ddevice_mgr.cc38 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in StaticDeviceMgr()
43 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in StaticDeviceMgr()
Ddevice_set.cc39 DeviceNameUtils::GetNamesForDeviceMappings(device->parsed_name())) { in AddDevice()
50 if (DeviceNameUtils::IsCompleteSpecification(spec, d->parsed_name())) { in FindMatchingDevices()
Dgraph_execution_state.cc356 DeviceNameUtils::ParsedName parsed_name; in LookupDevice() local
357 if (!DeviceNameUtils::ParseFullName(it->second, &parsed_name)) { in LookupDevice()
363 DeviceNameUtils::ParsedNameToString(parsed_name)); in LookupDevice()
727 if (device->parsed_name().id == 0 && in OptimizeGraph()
728 StringPiece(device->parsed_name().type) == "CPU" && in OptimizeGraph()
Ddevice.h66 const DeviceNameUtils::ParsedName& parsed_name() const { in parsed_name() function
Dcolocation_graph.cc482 for (const auto& parsed_name : in MaybeExcludeXlaDevices()
484 if (parsed_name.has_type && IsXlaDevice(parsed_name.type)) { in MaybeExcludeXlaDevices()
562 return DeviceNameUtils::AddressSpace(client_device->parsed_name()); in LocalAddressSpec()
566 return DeviceNameUtils::AddressSpace(default_local_device->parsed_name()); in LocalAddressSpec()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Deval_util.cc66 DeviceNameUtils::ParsedName parsed_name; in ForceUseLocalhostDevice() local
68 if (!DeviceNameUtils::ParseFullName(node_def->device(), &parsed_name)) return; in ForceUseLocalhostDevice()
70 if (parsed_name.has_job) parsed_name.job = "localhost"; in ForceUseLocalhostDevice()
71 if (parsed_name.has_replica) parsed_name.replica = 0; in ForceUseLocalhostDevice()
72 if (parsed_name.has_task) parsed_name.task = 0; in ForceUseLocalhostDevice()
75 DeviceNameUtils::ParsedNameToString(parsed_name); in ForceUseLocalhostDevice()
Dtpu_rewrite_device_util_test.cc37 Device parsed_name; in DeviceNamesToParsedNames() local
38 if (!DeviceNameUtils::ParseFullName(device_name, &parsed_name)) in DeviceNamesToParsedNames()
41 parsed_devices->push_back(parsed_name); in DeviceNamesToParsedNames()
Ddevice_util_test.cc50 DeviceNameUtils::ParsedName parsed_name; in Make() local
51 DeviceNameUtils::ParseFullName(name, &parsed_name); in Make()
55 device_attributes.set_device_type(parsed_name.type); in Make()
Ddevice_util.cc44 DeviceNameUtils::ParsedNameToString(device->parsed_name())); in AddDevicesToOp()
/external/tensorflow/tensorflow/core/util/
Ddevice_name_utils.cc180 DeviceNameUtils::ParsedName* parsed_name) { in CompleteName() argument
181 if (!parsed_name->has_job) { in CompleteName()
182 parsed_name->job = parsed_basename.job; in CompleteName()
183 parsed_name->has_job = true; in CompleteName()
185 if (!parsed_name->has_replica) { in CompleteName()
186 parsed_name->replica = parsed_basename.replica; in CompleteName()
187 parsed_name->has_replica = true; in CompleteName()
189 if (!parsed_name->has_task) { in CompleteName()
190 parsed_name->task = parsed_basename.task; in CompleteName()
191 parsed_name->has_task = true; in CompleteName()
[all …]
/external/tensorflow/tensorflow/python/util/
Dkernel_registry.cc44 tensorflow::DeviceNameUtils::ParsedName parsed_name; in TryFindKernelClass() local
46 &parsed_name)) { in TryFindKernelClass()
52 tensorflow::FindKernelDef(tensorflow::DeviceType(parsed_name.type.c_str()), in TryFindKernelClass()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dimplementation_selector.cc239 DeviceNameUtils::ParsedName parsed_name; in MaybeOptimizeFunctionCall() local
240 if (!DeviceNameUtils::ParseFullName(node_def->device(), &parsed_name) || in MaybeOptimizeFunctionCall()
241 !parsed_name.has_type) { in MaybeOptimizeFunctionCall()
245 << " = (" << parsed_name.type << ")"; in MaybeOptimizeFunctionCall()
256 if (func_api_info->preferred_device() == parsed_name.type) { in MaybeOptimizeFunctionCall()
271 if (func_api_info->preferred_device() == parsed_name.type) { in MaybeOptimizeFunctionCall()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_graph.cc145 DeviceNameUtils::ParsedName parsed_name; in GetEngineInfo() local
147 DeviceNameUtils::ParseFullName(device_name, &parsed_name); in GetEngineInfo()
152 } else if (parsed_name.type != "GPU") { in GetEngineInfo()
267 DeviceNameUtils::ParsedName parsed_name; in GetEngineInfo() local
268 parsed_name.type = "GPU"; in GetEngineInfo()
269 parsed_name.has_type = true; in GetEngineInfo()
270 parsed_name.id = tf_gpu_id.value(); in GetEngineInfo()
271 parsed_name.has_id = true; in GetEngineInfo()
272 info->device = DeviceNameUtils::ParsedNameToString(parsed_name); in GetEngineInfo()
579 DeviceNameUtils::ParsedName parsed_name; in GetDeviceAndAllocator() local
[all …]
/external/tensorflow/tensorflow/core/common_runtime/eager/
Dcontext.cc179 preferred = HostCPU()->parsed_name(); in SelectDevice()
698 return first->parsed_name().job == second->parsed_name().job && in OnSameTask()
699 first->parsed_name().replica == second->parsed_name().replica && in OnSameTask()
700 first->parsed_name().task == second->parsed_name().task; in OnSameTask()
727 return GetClient(device->parsed_name(), client); in GetClient()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_cluster_util.cc254 DeviceNameUtils::ParsedName parsed_name; in GetGpuNumber() local
255 if (!DeviceNameUtils::ParseFullName(device_name, &parsed_name)) { in GetGpuNumber()
259 return parsed_name.type == DEVICE_GPU ? parsed_name.id : -1; in GetGpuNumber()
/external/tensorflow/tensorflow/python/grappler/
Dtf_optimizer_wrapper.cc51 prop = tensorflow::grappler::GetDeviceInfo(device->parsed_name()); in DetectDevices()
/external/tensorflow/tensorflow/core/grappler/clusters/
Dvirtual_cluster.cc50 DeviceProperties props = GetDeviceInfo(device->parsed_name()); in VirtualCluster()
/external/tensorflow/tensorflow/core/grappler/
Dutils.cc569 DeviceNameUtils::ParsedName parsed_name; in IsKernelRegisteredForNode() local
570 if (!DeviceNameUtils::ParseFullName(node_device, &parsed_name)) { in IsKernelRegisteredForNode()
574 return FindKernelDef(DeviceType(parsed_name.type), node_name, in IsKernelRegisteredForNode()
/external/tensorflow/tensorflow/c/eager/
Dc_api.cc280 tensorflow::DeviceNameUtils::ParsedName parsed_name; in CreateRemoteContexts() local
282 &parsed_name)) { in CreateRemoteContexts()
306 request.mutable_server_def()->set_job_name(parsed_name.job); in CreateRemoteContexts()
307 request.mutable_server_def()->set_task_index(parsed_name.task); in CreateRemoteContexts()
374 tensorflow::DeviceNameUtils::ParsedName parsed_name; in UpdateRemoteContexts() local
376 &parsed_name)) { in UpdateRemoteContexts()
419 request.mutable_server_def()->set_job_name(parsed_name.job); in UpdateRemoteContexts()
420 request.mutable_server_def()->set_task_index(parsed_name.task); in UpdateRemoteContexts()
/external/tensorflow/tensorflow/core/distributed_runtime/
Dmaster.cc402 if (env_->local_devices[0]->parsed_name().job == job.name() && in CreateSession()
403 env_->local_devices[0]->parsed_name().task == task.first) { in CreateSession()
432 DeviceNameUtils::ParsedName name = d->parsed_name(); in CreateSession()

12