- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for kDeviceAttr (0.72 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc
} else if (StringAttr attr = arg.getDefiningOp()->getAttrOfType<StringAttr>( kDeviceAttr)) { return op_device == attr; } // Fold tf.Identity when arg device is not defined. return true; }; func_op.walk([&should_fold_op_func](TF::IdentityOp op) { StringAttr op_device = op->getAttrOfType<StringAttr>(kDeviceAttr); if (should_fold_op_func(op.getOperand(), op_device)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc
// propagated through. bool IsSupportedExecutorOp(Operation& op) { auto ops_have_same_device = [](Operation* lhs, Operation* rhs) { auto lhs_device_attr = lhs->getAttrOfType<StringAttr>(kDeviceAttr); auto rhs_device_attr = rhs->getAttrOfType<StringAttr>(kDeviceAttr); return (!lhs_device_attr && !rhs_device_attr) || (lhs_device_attr && rhs_device_attr && lhs_device_attr.getValue() == rhs_device_attr.getValue()); };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc
} auto device_attr = op->getAttr(kDeviceAttr); if (!device_attr) { op->setAttr(kDeviceAttr, launch.getDeviceAttr()); return WalkResult::advance(); } if (auto device_str_attr = mlir::dyn_cast<StringAttr>(device_attr)) { if (device_str_attr.getValue().empty()) { op->setAttr(kDeviceAttr, launch.getDeviceAttr()); return WalkResult::advance();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.cc
#include "tensorflow/core/util/device_name_utils.h" namespace mlir { namespace TF { namespace { const char kDeviceAttr[] = "device"; const char kDeviceGpu[] = "GPU"; std::optional<std::string> GetOpDevice(mlir::Operation *op) { mlir::StringAttr device = op->getAttrOfType<mlir::StringAttr>(kDeviceAttr); if (!device || device.getValue().empty()) { return std::nullopt; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc
#include "tensorflow/core/protobuf/tpu/compile_metadata.pb.h" #include "tensorflow/core/util/device_name_utils.h" namespace mlir { namespace TFTPU { namespace { constexpr char kDeviceAttr[] = "device"; constexpr char kDeviceCPU[] = "CPU"; constexpr char kFuncDeviceAttr[] = "tf.device"; struct TPUDynamicLayoutPass : public TF::PerFunctionAggregateAnalysisConsumerPass<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc
#include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h" #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" namespace mlir { namespace TFDevice { namespace { constexpr char kDeviceAttr[] = "device"; #define GEN_PASS_DEF_REPLICATEINVARIANTOPHOISTINGPASS #include "tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.h.inc" struct ReplicateInvariantOpHoistingPass
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc
// Both the device attribute and compile_device_type attribute should be // propagated to the reduce function call. reduce_call->setAttr(kDeviceAttr, reduce_dataset->getAttrOfType<StringAttr>(kDeviceAttr)); reduce_call->setAttr( TF::kCompileDeviceTypeAttr, reduce_dataset->getAttrOfType<StringAttr>(TF::kCompileDeviceTypeAttr)); SmallVector<Value, 4> if_returns;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc
namespace TF { namespace { using DeviceNameUtils = ::tensorflow::DeviceNameUtils; using ParsedName = ::tensorflow::DeviceNameUtils::ParsedName; constexpr const char *kHostAttr = "host"; constexpr const char *kDeviceAttr = "device"; constexpr const char *kTFDeviceAttr = "tf.device"; // TODO(donglin): Handle the case where the address of localhost is different // from /job:localhost/replica:0/task:0.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 13.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/cluster_ops_by_policy.cc
auto range = llvm::make_filter_range(op->getUsers(), [&](Operation *user) { bool same_block = user->getBlock() == op->getBlock(); bool same_device = op->getAttr(kDeviceAttr) == user->getAttr(kDeviceAttr); return same_block && same_device && state.IsMember(user); }); return {range.begin(), range.end()}; } // Users of block argument must be in the same block.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 27.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc
} } return success(); } namespace { constexpr char kDeviceAttr[] = "device"; constexpr char kFuncDeviceAttr[] = "tf.device"; mlir::Attribute GetDeviceOfResource(mlir::func::FuncOp func, mlir::Value resource) { if (auto* resource_op = resource.getDefiningOp()) { return resource_op->getAttr(kDeviceAttr); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 11.8K bytes - Viewed (0)