- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 135 for getAttrOfType (0.17 sec)
-
tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.cc
CreateOp op = *this; p << "(" << op.getInCh() << ") key(" << op->getAttrOfType<mlir::IntegerAttr>("op_key").getInt() << ") device(" << op->getAttr("device") << ") " << op->getAttr("op_name") << "()"; fallback_common::PrintExecuteOpCommon(p, op); fallback_common::PrintExecuteOpFuncAttribute(p, op); p << " num_args(" << op->getAttrOfType<mlir::IntegerAttr>("num_args").getInt() << ')'; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 15.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_validate_inputs.cc
return true; } std::string shard_string; if (op->hasAttr(kXLAShardingAttr)) { shard_string = op->getAttrOfType<StringAttr>(kXLAShardingAttr).strref().str(); } else { shard_string = op->getAttrOfType<StringAttr>(kShardingAttr).strref().str(); } xla::OpSharding sharding; if (!shard_string.empty() && sharding.ParseFromString(shard_string)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 06:51:01 UTC 2024 - 21.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc
// `tf_device::ClusterFuncOp`. LogicalResult SetMetadataProtoStepMarkerLocation( tf_device::ClusterFuncOp op, tensorflow::tpu::TPUCompileMetadataProto* metadata) { auto step_marker_location = op->getAttrOfType<StringAttr>(kStepMarkerLocationAttr); if (!step_marker_location) return op.emitOpError(CreateMissingAttributeMsg(kStepMarkerLocationAttr)); // Default to `STEP_MARK_AT_ENTRY` for step marker location if attribute is
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_colocate_splits.cc
if (auto split = llvm::dyn_cast<TF::SplitOp>(op)) { if (HasDevice(split) || split->getAttrOfType<ArrayAttr>(kClassAttr)) return WalkResult::advance(); for (Operation* pred : IslandPredecessors(split)) { if (auto colocation_classes = pred->getAttrOfType<ArrayAttr>(kClassAttr)) { split->setAttr(kClassAttr, colocation_classes); return WalkResult::advance();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 27 18:44:34 UTC 2023 - 2.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_device_assignment.cc
void runOnOperation() override { Builder builder(&getContext()); Dialect* tf = getContext().getLoadedDialect<TensorFlowDialect>(); getOperation().walk([&](Operation* op) { if (auto device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { // We assign default device to ops with device attribute that is empty. if (device_attr.getValue().empty()) { op->setAttr(kDeviceAttr, builder.getStringAttr(default_device_));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/replica_id_to_device_ordinal.cc
// attribute modulo the number of TPU cores in the system. for (auto op : require_device_ordinal_ops) { if (op->getAttrOfType<IntegerAttr>(kDeviceOrdinalAttr).getInt() == -1) { OpBuilder builder(op); int device_ordinal = op->getAttrOfType<IntegerAttr>(kReplicaIdAttr).getInt() % device_num; op->setAttr(kDeviceOrdinalAttr,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.cc
namespace mlir { namespace TF { using ::tensorflow::kValidDeviceTypes; LogicalResult HasValidCompilationAndReplicationAttributes(Operation& op) { auto replicate_attr = op.getAttrOfType<StringAttr>(kReplicationInfoAttr); auto compile_attr = op.getAttrOfType<StringAttr>(kCompileDeviceTypeAttr); if (!replicate_attr && !compile_attr) return success(); if (!replicate_attr || !compile_attr)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 22:03:30 UTC 2024 - 3.8K bytes - Viewed (0) -
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/lite/quantization/device_target.cc
double real_multiplier = scale_product / o_spec.getScale(); output_multipliers->push_back(QuantizeMultiplier(real_multiplier)); // output ranges auto min = rop->getAttrOfType<FloatAttr>("min"); auto max = rop->getAttrOfType<FloatAttr>("max"); output_ranges->push_back(CalculateQuantizedRange( o_spec.getScale(), o_spec.getZeroPoint(), (min ? std::optional<double>(min.getValueAsDouble()) : std::nullopt),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 08 10:41:08 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/readonly_references_to_resources.cc
StringAttr shared_name_attr = op->getAttrOfType<StringAttr>(kSharedNameAttr); if (shared_name_attr) { auto shared_name = StringRef(shared_name_attr.getValue()); if (!shared_name.empty()) { return shared_name; } } // Attempt to parse "_class" attribute if there is no "shared_name" // attribute. ArrayAttr classes_attr = op->getAttrOfType<ArrayAttr>(kClassAttr); if (!classes_attr) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.8K bytes - Viewed (0)