Home
last modified time | relevance | path

Searched refs:device_attr (Results 1 – 25 of 33) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dconstant_op_device_assignment.cc46 if (StringAttr device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { in runOnOperation() local
56 StringAttr device_attr = user_op->getAttrOfType<StringAttr>(kDeviceAttr); in runOnOperation() local
57 if (!device_attr) { in runOnOperation()
63 if (cloned_op_by_device.find(device_attr.getValue()) == in runOnOperation()
66 new_op->setAttr(kDeviceAttr, device_attr); in runOnOperation()
67 cloned_op_by_device[device_attr.getValue()] = new_op; in runOnOperation()
70 mlir::Operation *new_op = cloned_op_by_device[device_attr.getValue()]; in runOnOperation()
Dresource_device_inference.cc132 auto device_attr = in GetDeviceAttr() local
134 return device_attr ? device_attr.getValue() : ""; in GetDeviceAttr()
139 auto device_attr = op->getAttrOfType<mlir::StringAttr>(kDeviceAttr); in GetDeviceAttr() local
140 return device_attr ? device_attr.getValue() : ""; in GetDeviceAttr()
156 StringRef device_attr = GetDeviceAttr(func_op, arg.getArgNumber()); in ComputeResourceDevicesInComputation() local
157 if (device_attr.empty()) { in ComputeResourceDevicesInComputation()
167 auto res = AddResourceDeviceAndEmitError(arg, device_attr, func_op, result); in ComputeResourceDevicesInComputation()
177 StringRef device_attr = GetDeviceAttr(op); in ComputeResourceDevicesInComputation() local
178 if (device_attr.empty()) return WalkResult::advance(); in ComputeResourceDevicesInComputation()
180 device_attr, op, result); in ComputeResourceDevicesInComputation()
Dtpu_device_propagation.cc178 auto device_attr = op_to_update->getAttrOfType<StringAttr>(kDeviceAttr); in PropagateDevicesInGraph() local
179 const bool has_device = device_attr && !device_attr.getValue().empty(); in PropagateDevicesInGraph()
180 if (has_device && tensorflow::IsTPUDevice(device_attr.getValue())) { in PropagateDevicesInGraph()
181 PopulateDeviceForOpResults(*op_to_update, device_attr.getValue(), in PropagateDevicesInGraph()
221 auto device_attr = func.getResultAttrOfType<StringAttr>( in PropagateDevicesToResults() local
223 if (device_attr && !device_attr.getValue().empty()) continue; in PropagateDevicesToResults()
Dtf_device_assignment.cc43 if (auto device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { in runOnOperation() local
45 if (device_attr.getValue().empty()) { in runOnOperation()
80 if (auto device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { in runOnOperation() local
82 if (device_attr.getValue().empty()) { in runOnOperation()
Dlaunch_to_device_attribute.cc45 auto device_attr = op->getAttr(kDeviceAttr); in AssignDevicesInRegion() local
46 if (!device_attr) { in AssignDevicesInRegion()
51 if (auto device_str_attr = device_attr.dyn_cast<StringAttr>()) { in AssignDevicesInRegion()
64 << "inner op has bad 'device' attribute, got " << device_attr; in AssignDevicesInRegion()
Dhost_launch_to_outside_compiled.cc73 StringAttr device_attr = launch->getAttrOfType<StringAttr>(kDeviceAttr); in runOnOperation() local
74 if (host_device && device_attr && in runOnOperation()
75 device_attr.getValue().equals(*host_device)) in runOnOperation()
Dreadonly_references_to_resources.cc153 StringAttr device_attr = in runOnOperation() local
155 if (!device_attr) device_attr = builder.getStringAttr(""); in runOnOperation()
168 builder.getNamedAttr("device", device_attr), in runOnOperation()
Dcluster_formation.cc56 auto device_attr = op->getAttrOfType<StringAttr>("device"); in GetDevice() local
57 return device_attr ? device_attr.getValue() : ""; in GetDevice()
Dtpu_merge_variables_with_execute.cc156 Attribute device_attr = execute_launch.deviceAttr(); in BuildVariableAccessInfo() local
157 if (check_device && !device_attr) return var_access_info; in BuildVariableAccessInfo()
188 if (!resource_attr || resource_attr != device_attr) continue; in BuildVariableAccessInfo()
196 if (!resource_attr || resource_attr != device_attr) continue; in BuildVariableAccessInfo()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_device_helper.cc54 auto device_attr = op->getAttrOfType<StringAttr>("device"); in CanUseGpuDevice() local
55 if (!device_attr || device_attr.getValue().empty()) return true; in CanUseGpuDevice()
58 if (!DeviceNameUtils::ParseFullName(device_attr.getValue().str(), &device)) in CanUseGpuDevice()
Dtf_op_interfaces.cc22 if (auto device_attr = op->getAttrOfType<StringAttr>("device")) in GetDeviceOrEmpty() local
23 return device_attr.getValue(); in GetDeviceOrEmpty()
Dtf_device.cc482 for (auto device_attr : op.devices().getValue().getValue()) { in verify() local
483 auto device_list = device_attr.getValue().dyn_cast_or_null<ArrayAttr>(); in verify()
/external/tensorflow/tensorflow/core/distributed_runtime/integration_test/
Dc_api_multi_client_test.cc131 for (const auto& device_attr : device_attrs) { in TEST() local
132 device_names.push_back(device_attr.name()); in TEST()
178 for (const auto& device_attr : device_attrs) { in TEST() local
179 if (device_attr.name() == send_device) { in TEST()
180 send_device_incarnation = device_attr.incarnation(); in TEST()
Dc_api_multi_client_function_test.cc243 for (const auto& device_attr : device_attrs) { in TEST_P() local
244 if (device_attr.name() == send_device) { in TEST_P()
245 send_device_incarnation = device_attr.incarnation(); in TEST_P()
/external/tensorflow/tensorflow/compiler/mlir/tfrt/transforms/
Dcross_device_transfer.cc78 if (StringAttr device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { in GetDevice() local
79 device = device_attr.getValue().str(); in GetDevice()
98 if (StringAttr device_attr = parent_func_op.getArgAttrOfType<StringAttr>( in GetDevice() local
100 device = device_attr.getValue().str(); in GetDevice()
Dfallback_converter.cc90 if (auto device_attr = def->getAttrOfType<mlir::StringAttr>("device")) { in ConvertFallbackTensorToCoreRTTensorHandle() local
96 if (!device_attr.getValue().endswith("TPU_SYSTEM:0")) { in ConvertFallbackTensorToCoreRTTensorHandle()
97 device = device_attr.getValue(); in ConvertFallbackTensorToCoreRTTensorHandle()
Dlower_saved_model.cc125 if (auto device_attr = in ReplaceHoistedValues() local
127 if (!device_attr.getValue().empty()) device = device_attr.getValue(); in ReplaceHoistedValues()
385 if (auto device_attr = new_op->getAttrOfType<mlir::StringAttr>("device")) { in HoistInvariantOps() local
386 if (!device_attr.getValue().empty()) device = device_attr.getValue(); in HoistInvariantOps()
651 if (auto device_attr = op->getAttrOfType<mlir::StringAttr>("device")) { in runOnOperation() local
652 device = device_attr.getValue(); in runOnOperation()
Dcorert_converter.cc149 auto device_attr = op->getAttr("device"); in ParseDeviceName() local
150 if (!device_attr) { in ParseDeviceName()
155 ParseDeviceName(device_attr.cast<mlir::StringAttr>().getValue()); in ParseDeviceName()
/external/tensorflow/tensorflow/core/ir/
Dtf_op_wrapper.h132 StringAttr device_attr = deviceAttr(); in device() local
133 if (device_attr) return device_attr.getValue(); in device()
/external/tensorflow/tensorflow/core/distributed_runtime/rpc/
Dgrpc_session.cc395 for (const auto& device_attr : resp.local_device()) { in ListDevices() local
396 response->emplace_back(device_attr); in ListDevices()
398 for (const auto& device_attr : resp.remote_device()) { in ListDevices() local
399 response->emplace_back(device_attr); in ListDevices()
/external/tensorflow/tensorflow/compiler/mlir/lite/experimental/tac/transforms/
Dget_alternative_subgraph.cc290 auto device_attr = func->getAttrOfType<StringAttr>(kDevice); in runOnOperation() local
291 if (device_attr != nullptr) funcs_to_be_processed.push_back(func); in runOnOperation()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dexport_graphdef.cc218 if (auto device_attr = in GetArgumentNode() local
220 *node_def->mutable_device() = device_attr.getValue().str(); in GetArgumentNode()
253 if (auto device_attr = in GetReturnNode() local
255 *node_def->mutable_device() = device_attr.getValue().str(); in GetReturnNode()
/external/tensorflow/tensorflow/core/ir/importexport/
Dfunctiondef_import.cc162 StringAttr device_attr = tfgDialect->getDeviceAttrIdentifier(); in ImportNodes() local
190 state.addAttribute(device_attr, StringAttr::get(context, node.device())); in ImportNodes()
/external/tensorflow/tensorflow/core/runtime_fallback/runtime/
Druntime_fallback_kernels.cc1078 RemainingArguments args, RemainingResults results, StringAttr device_attr, in RuntimeFallbackExecuteOp() argument
1096 std::string device_name = device_attr.GetValue().str(); in RuntimeFallbackExecuteOp()
/external/tensorflow/tensorflow/core/transforms/constant_folding/
Dpass.cc176 if (StringAttr device_attr = switch_op.deviceAttr()) in GetControlAnchorForSwitchResult() local
177 identity_op.setRequestedDevice(device_attr); in GetControlAnchorForSwitchResult()
732 StringAttr device_attr = TFOp(op).deviceAttr(); in matchAndRewrite() local
742 if (device_attr) (*const_op).setRequestedDevice(device_attr); in matchAndRewrite()

12