/external/tensorflow/tensorflow/core/grappler/costs/ |
D | virtual_placer.cc | 64 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 …]
|
D | utils.cc | 393 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/tpu/kernels/ |
D | host_compute_ops.cc | 58 DeviceNameUtils::ParsedName parsed_name; in RecvAtHostOp() local 61 DeviceNameUtils::ParseFullName(ctx->device()->name(), &parsed_name), in RecvAtHostOp() 63 parsed_name.type = "CPU"; in RecvAtHostOp() 64 parsed_name.id = 0; in RecvAtHostOp() 65 cpu_device_ = DeviceNameUtils::ParsedNameToString(parsed_name); in RecvAtHostOp() 67 parsed_name.type = "TPU"; in RecvAtHostOp() 68 parsed_name.id = device_ordinal; in RecvAtHostOp() 69 tpu_device_ = DeviceNameUtils::ParsedNameToString(parsed_name); in RecvAtHostOp() 89 DeviceNameUtils::ParsedName parsed_name; in ComputeAsync() local 91 ctx, DeviceNameUtils::ParseFullName(cpu_device_, &parsed_name), in ComputeAsync() [all …]
|
/external/tensorflow/tensorflow/core/tpu/graph_rewrite/ |
D | distributed_tpu_rewrite_helpers.cc | 60 const auto& parsed_name = device->parsed_name(); in GetSystemDevice() local 61 TF_RET_CHECK(parsed_name.has_job); in GetSystemDevice() 62 job_names.insert(parsed_name.job); in GetSystemDevice() 76 auto i_name = i->parsed_name(); in GetSystemDevice() 77 auto j_name = j->parsed_name(); in GetSystemDevice() 121 TF_RET_CHECK((*host_system_devices)[0]->parsed_name().has_job); in GetHostSystemDevices() 122 const string& job_name = (*host_system_devices)[0]->parsed_name().job; in GetHostSystemDevices() 123 int replica = (*host_system_devices)[0]->parsed_name().replica; in GetHostSystemDevices() 125 const auto& parsed_name = host_device->parsed_name(); in GetHostSystemDevices() local 126 TF_RET_CHECK(parsed_name.has_job); in GetHostSystemDevices() [all …]
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | renamed_device.cc | 31 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()
|
D | composite_device.cc | 28 DeviceNameUtils::ParsedName parsed_name = host_name; in MakeDevice() local 29 parsed_name.type = kCompositeDeviceType; in MakeDevice() 30 parsed_name.id = unique_device_id; in MakeDevice() 31 const string device_name = DeviceNameUtils::ParsedNameToString(parsed_name); in MakeDevice() 43 DeviceNameUtils::ParsedName parsed_name; in MakeDevice() local 44 if (!DeviceNameUtils::ParseFullName(underlying_devices.at(0), &parsed_name)) { in MakeDevice() 50 const string& underlying_type = parsed_name.type; in MakeDevice() 61 "Expect device type ", parsed_name.type, "; but got type ", name.type, in MakeDevice()
|
D | dynamic_device_mgr.cc | 137 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in AddDevices() 142 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in AddDevices() 171 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in RemoveDevices() 176 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in RemoveDevices() 206 pair.first->parsed_name().id == 0) { in HostCPU()
|
D | device_mgr.cc | 38 DeviceNameUtils::GetNamesForDeviceMappings(d->parsed_name())) { in StaticDeviceMgr() 43 DeviceNameUtils::GetLocalNamesForDeviceMappings(d->parsed_name())) { in StaticDeviceMgr() 49 if (cpu_device_ == nullptr && t == "CPU" && d->parsed_name().id == 0) { in StaticDeviceMgr()
|
D | collective_param_resolver_local.cc | 325 DeviceNameUtils::ParsedName parsed_name; in ParseRingOrder() local 327 if (!DeviceNameUtils::ParseFullName(dr->device, &parsed_name)) { in ParseRingOrder() 330 auto rank_it = gpu_ranks.find(parsed_name.id); in ParseRingOrder() 358 DeviceNameUtils::ParsedName parsed_name; in OrderTaskDeviceMap() local 359 CHECK(DeviceNameUtils::ParseFullName(next_device, &parsed_name)); in OrderTaskDeviceMap() 378 if (parsed_name.type == "GPU") { in OrderTaskDeviceMap() 380 parsed_name.id = il.device_id(); in OrderTaskDeviceMap() 382 DeviceNameUtils::ParsedNameToString(parsed_name); in OrderTaskDeviceMap() 399 parsed_name.id = best_link->device_id(); in OrderTaskDeviceMap() 400 next_device = DeviceNameUtils::ParsedNameToString(parsed_name); in OrderTaskDeviceMap()
|
D | device_set.cc | 39 DeviceNameUtils::GetNamesForDeviceMappings(device->parsed_name())) { in AddDevice() 50 if (DeviceNameUtils::IsCompleteSpecification(spec, d->parsed_name())) { in FindMatchingDevices()
|
/external/tensorflow/tensorflow/core/util/ |
D | device_name_utils.cc | 185 DeviceNameUtils::ParsedName* parsed_name) { in CompleteName() argument 186 if (!parsed_name->has_job) { in CompleteName() 187 parsed_name->job = parsed_basename.job; in CompleteName() 188 parsed_name->has_job = true; in CompleteName() 190 if (!parsed_name->has_replica) { in CompleteName() 191 parsed_name->replica = parsed_basename.replica; in CompleteName() 192 parsed_name->has_replica = true; in CompleteName() 194 if (!parsed_name->has_task) { in CompleteName() 195 parsed_name->task = parsed_basename.task; in CompleteName() 196 parsed_name->has_task = true; in CompleteName() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | implementation_selector.cc | 263 DeviceNameUtils::ParsedName parsed_name; in MaybeOptimizeFunctionCall() local 264 if (!DeviceNameUtils::ParseFullName(node_def->device(), &parsed_name) || in MaybeOptimizeFunctionCall() 265 !parsed_name.has_type) { in MaybeOptimizeFunctionCall() 269 << " = (" << parsed_name.type << ")"; in MaybeOptimizeFunctionCall() 280 if (func_api_info->preferred_device() == parsed_name.type) { in MaybeOptimizeFunctionCall() 295 if (func_api_info->preferred_device() == parsed_name.type) { in MaybeOptimizeFunctionCall() 307 DeviceNameUtils::ParsedName parsed_name; in FindDeviceIndex() local 308 if (!DeviceNameUtils::ParseFullName(device, &parsed_name) || in FindDeviceIndex() 309 !parsed_name.has_type) { in FindDeviceIndex() 314 auto it = absl::c_find(device_list, parsed_name.type); in FindDeviceIndex()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | cross_host_transfer.cc | 47 DeviceNameUtils::ParsedName parsed_name; in GetHost() local 48 DeviceNameUtils::ParseFullName(device, &parsed_name); in GetHost() 49 parsed_name.has_id = false; in GetHost() 50 parsed_name.has_type = false; in GetHost() 52 auto host = DeviceNameUtils::ParsedNameToString(parsed_name); in GetHost()
|
D | tpu_compile_op_replication_pass.cc | 37 ParsedName parsed_name; in GetHost() local 38 DeviceNameUtils::ParseFullName(device.getValue().str(), &parsed_name); in GetHost() 40 DeviceNameUtils::AddressSpace(parsed_name)); in GetHost()
|
D | cluster_tf_ops_pass.cc | 58 ParsedName parsed_name; in GetHost() local 59 DeviceNameUtils::ParseFullName(device.str(), &parsed_name); in GetHost() 61 DeviceNameUtils::AddressSpace(parsed_name)); in GetHost()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | device_util_test.cc | 50 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() 197 DeviceNameUtils::ParsedName parsed_name; in TEST() local 198 DeviceNameUtils::ParseFullName(gpu0, &parsed_name); in TEST() 199 auto meta_0 = devices.GetGpuDeviceMetadata(parsed_name); in TEST() 204 DeviceNameUtils::ParseFullName(gpu1, &parsed_name); in TEST() 205 auto meta_1 = devices.GetGpuDeviceMetadata(parsed_name); in TEST()
|
D | device_util.cc | 131 string name = DeviceNameUtils::ParsedNameToString(device->parsed_name()); in AddDevicesToOp() 164 DeviceNameUtils::ParsedName parsed_name; in GetDeviceOrdinalFromDeviceString() local 166 absl::string_view(device.data(), device.size()), &parsed_name)) in GetDeviceOrdinalFromDeviceString() 169 if (!parsed_name.has_id) in GetDeviceOrdinalFromDeviceString() 172 *device_ordinal = parsed_name.id; in GetDeviceOrdinalFromDeviceString()
|
/external/tensorflow/tensorflow/python/util/ |
D | kernel_registry.cc | 44 tensorflow::DeviceNameUtils::ParsedName parsed_name; in TryFindKernelClass() local 46 &parsed_name)) { in TryFindKernelClass() 53 tensorflow::DeviceType(parsed_name.type.c_str()), node_def, in TryFindKernelClass()
|
/external/tensorflow/tensorflow/core/common_runtime/eager/ |
D | custom_device.cc | 74 DeviceNameUtils::ParsedName parsed_name; in ParsedName() local 75 if (!DeviceNameUtils::ParseFullOrLocalName(device_->name(), &parsed_name)) { in ParsedName() 80 parsed_name_.emplace(std::move(parsed_name)); in ParsedName()
|
D | context_distributed_manager.cc | 55 if (server_def.job_name() != context->HostCPU()->parsed_name().job) { in AreLocalDevicesCompatible() 226 tensorflow::DeviceNameUtils::ParsedName parsed_name; in CreateRemoteContexts() local 228 &parsed_name)) { in CreateRemoteContexts() 252 request.mutable_server_def()->set_job_name(parsed_name.job); in CreateRemoteContexts() 253 request.mutable_server_def()->set_task_index(parsed_name.task); in CreateRemoteContexts() 324 tensorflow::DeviceNameUtils::ParsedName parsed_name; in UpdateRemoteContexts() local 326 &parsed_name)) { in UpdateRemoteContexts() 369 request.mutable_server_def()->set_job_name(parsed_name.job); in UpdateRemoteContexts() 370 request.mutable_server_def()->set_task_index(parsed_name.task); in UpdateRemoteContexts()
|
D | context.cc | 258 dev->parsed_name())) { in SelectBestMatchingDevice() 275 *device_type_list, ndef, &supported_devs, &HostCPU()->parsed_name())); in SelectDevice() 942 HostCPU()->parsed_name(), &s); in FindOrCreateCompositeDevice() 956 return first->parsed_name().job == second->parsed_name().job && in OnSameTask() 957 first->parsed_name().replica == second->parsed_name().replica && in OnSameTask() 958 first->parsed_name().task == second->parsed_name().task; in OnSameTask() 994 return GetClient(device->parsed_name(), client); in GetClient()
|
/external/tensorflow/tensorflow/lite/tools/ |
D | list_flex_ops.cc | 62 tensorflow::DeviceNameUtils::ParsedName parsed_name; in FindTensorflowKernelClass() local 64 &parsed_name)) { in FindTensorflowKernelClass() 70 tensorflow::DeviceType(parsed_name.type.c_str()), *node_def, in FindTensorflowKernelClass()
|
/external/tensorflow/tensorflow/c/eager/ |
D | dlpack.cc | 114 DeviceNameUtils::ParsedName parsed_name; in GetDlContext() local 115 tensorflow::DeviceNameUtils::ParseFullName(device_name, &parsed_name); in GetDlContext() 116 std::string device_type = parsed_name.type; in GetDlContext() 118 if (parsed_name.has_id) { in GetDlContext() 119 device_id = parsed_name.id; in GetDlContext()
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/ |
D | convert_graph.cc | 273 DeviceNameUtils::ParsedName parsed_name; in GetEngineInfo() local 274 parsed_name.type = "GPU"; in GetEngineInfo() 275 parsed_name.has_type = true; in GetEngineInfo() 276 parsed_name.id = tf_gpu_id.value(); in GetEngineInfo() 277 parsed_name.has_id = true; in GetEngineInfo() 278 info->device = DeviceNameUtils::ParsedNameToString(parsed_name); in GetEngineInfo() 656 DeviceNameUtils::ParsedName parsed_name; in GetDeviceAndAllocator() local 657 if (DeviceNameUtils::ParseFullName(engine.device, &parsed_name) && in GetDeviceAndAllocator() 658 parsed_name.has_id) { in GetDeviceAndAllocator() 659 device_set->FindMatchingDevices(parsed_name, &devices); in GetDeviceAndAllocator()
|
D | utils.cc | 272 DeviceNameUtils::ParsedName parsed_name; in GetDeviceParsedName() local 273 if (!DeviceNameUtils::ParseFullName(device_name, &parsed_name)) { in GetDeviceParsedName() 276 return parsed_name; in GetDeviceParsedName()
|