Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for IntegerAttr (0.18 sec)

  1. tensorflow/compiler/mlir/lite/utils/validators.cc

    bool TFIntListIs1XYZ1(Operation *op, StringRef name, IntegerAttr *x,
                          IntegerAttr *y, IntegerAttr *z) {
      auto attr = op->getAttrOfType<ArrayAttr>(name);
      if (!attr) return false;
    
      auto elements = attr.getValue();
      if (elements.size() != 5 ||
          std::any_of(elements.begin(), elements.end(),
                      [](Attribute e) { return !mlir::isa<IntegerAttr>(e); }))
        return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/validators.h

    // and writes X, Y as 32-bit integer attribute to `x`, `y`, z.
    bool TFIntListIs1XYZ1(Operation *op, StringRef name, IntegerAttr *x,
                          IntegerAttr *y, IntegerAttr *z);
    
    // Returns true if every element of the attribute is 1. All elements of `attr`
    // must be `IntegerAttr`.
    bool TFIntListIsAllOnes(Attribute attr);
    
    // Returns true iff the given value is a float32 tensor.
    // is "DT_FLOAT".
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. 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,
                        builder.getI64IntegerAttr(device_ordinal));
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/translate_utils.cc

      if (!version_attr) return mlir::failure();
    
      auto producer =
          mlir::dyn_cast_or_null<mlir::IntegerAttr>(version_attr.get("producer"));
      if (!producer) return mlir::failure();
      versions->set_producer(producer.getInt());
    
      auto min_consumer = mlir::dyn_cast_or_null<mlir::IntegerAttr>(
          version_attr.get("min_consumer"));
      if (min_consumer) versions->set_min_consumer(min_consumer.getInt());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/attribute_utils.cc

      } else {
        return mlir::dyn_cast_or_null<FloatAttr>(attr);
      }
    }
    
    IntegerAttr ExtractSingleElementAsInteger(ElementsAttr attr) {
      if (attr.getShapedType().getNumElements() != 1 ||
          !attr.getShapedType().getElementType().isSignlessInteger()) {
        return {};
      }
      return attr.getSplatValue<IntegerAttr>();
    }
    
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_composite_to_tfl_custom.cc

                              NamedAttribute pair) {
      const char* key = pair.getName().data();
      const auto attr = pair.getValue();
    
      if (mlir::isa<::mlir::IntegerAttr>(attr)) {
        fbb->Int(key, mlir::dyn_cast<mlir::IntegerAttr>(attr).getInt());
        return success();
      }
    
      if (mlir::isa<::mlir::FloatAttr>(attr)) {
        fbb->Double(key, mlir::dyn_cast<mlir::FloatAttr>(attr).getValueAsDouble());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.h

    /// converted type in outConvertedType.
    ///
    /// Examples:
    /// 1. realValue is a primitive value attribute:
    /// (realValue: FloatAttr, quantizedElementType: UniformQuantizedType[i8:f32])
    ///   -> (IntegerAttr, outConvertedType: i8)
    /// 2. realValue is an elements attribute:
    /// (realValue: DenseElementsAttr[tensor<2x2xf32>],
    ///  quantizedElementType: UniformQuantizedType[i8:f32])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 29 18:55:28 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

        FloatAttr attr = FloatAttr::get(float_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) {
        IntegerAttr attr = IntegerAttr::get(int_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto complex_ty = mlir::dyn_cast<ComplexType>(ty)) {
        Type complex_element_ty = complex_ty.getElementType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc

               << "'" << attr_name << "' attribute for " << kMaxUnpooling
               << " must be set and has size of " << N;
      }
      for (Attribute integer_attr : array_attr.getValue()) {
        IntegerAttr value = mlir::dyn_cast<IntegerAttr>(integer_attr);
        if (!value) {
          return func->emitWarning()
                 << "'" << attr_name << "' attribute for " << kMaxUnpooling
                 << " does not contain integer values";
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_common.cc

                                           mlir::Type tensor_type,
                                           const ParseExecuteOpOptions &options) {
      auto chain_type = builder.getType<compiler::ChainType>();
    
      mlir::IntegerAttr op_key;
      mlir::IntegerAttr cost;
      mlir::StringAttr device;
      mlir::StringAttr op_name;
      mlir::SymbolRefAttr f;
      llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand, 4> in_chains;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top