Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for getAttrOfType (0.2 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

      // The sizes of indices, shared_name and container must be equal.
      int32_t indices_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("indices").size();
      int32_t shared_name_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("shared_name").size();
      int32_t container_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("container").size();
    
      if (!(indices_size == shared_name_size &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      // 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;
    
      builder.create<TF::YieldOp>(loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc

    ResourceHandle GetResourceHandle(Operation *op) {
      llvm::StringRef device;
      if (auto attr = op->getAttrOfType<StringAttr>("device")) {
        device = attr.getValue();
      }
    
      llvm::StringRef container;
      if (auto attr = op->getAttrOfType<StringAttr>("container")) {
        container = attr.getValue();
      }
    
      llvm::StringRef shared_name;
      if (auto attr = op->getAttrOfType<StringAttr>("shared_name")) {
        shared_name = attr.getValue();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

      // Duplicate of the logic in MultiDeviceFunctionBodyPlacer::BodyNodeDevice
      // LINT.IfChange
      auto device_id = StringAttr::get(call->getContext(), "device");
      auto caller_device = call->getAttrOfType<StringAttr>(device_id);
      if (!caller_device) return;
    
      DeviceNameUtils::ParsedName caller_parsed_device;
      if (!DeviceNameUtils::ParseFullName(caller_device.getValue().str(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top