Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for getShapedType (0.89 sec)

  1. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

      "non-opaque constant tensor">;
    
    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    
    def Int64ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isInteger(64)">, "Int 64 constant tensor">;
    
    // Extract the ith int element from an ArrayAttr $0 as an 32-bit IntegerAttr
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc

            auto attr_id = mlir::StringAttr::get(context, "value");
            if (auto attr = inst.getAttrOfType<mlir::ElementsAttr>(attr_id)) {
              mlir::Attribute rand_val;
              mlir::Type element_type = attr.getShapedType().getElementType();
              if (mlir::isa<mlir::IntegerType>(element_type)) {
                rand_val = mlir::IntegerAttr::get(element_type, std::rand());
              } else if (element_type.isF16() || element_type.isF32() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 11:51:44 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

      if (!(start_tensor && limit_tensor && delta_tensor)) return nullptr;
    
      // Operands should all be scalars
      assert(start_tensor.getShapedType().getRank() == 0 &&
             limit_tensor.getShapedType().getRank() == 0 &&
             delta_tensor.getShapedType().getRank() == 0);
      Type elem_type = getType().cast<ShapedType>().getElementType();
      if (elem_type.isSignlessInteger() || elem_type.isUnsignedInteger()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

        return rewriter.notifyMatchFailure(
            stb_op,
            "SpaceToBatchND op's padding doesn't have same shape/type with "
            "BatchToSpaceND op's crops");
      }
      int64_t m = stb_paddings_attr.getShapedType().getDimSize(0);
      // padding - crop.
      for (uint64_t i = 0; i < m; ++i) {
        for (uint64_t j = 0; j < 2; ++j) {
          // `crops` tensor has shape [M, 2], crops[i] = [crop_start, crop_end]
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.isa<ElementsAttr>() && $_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">,
            "32 bit float constant tensor">;
    
    // Checks if the param passed is a float ElementsAttr.
    def FloatElementsAttr : ElementsAttrBase<
      CPred<"$_self.isa<ElementsAttr>() && $_self.cast<ElementsAttr>().getShapedType().getElementType().isa<FloatType>()">,
            "float constant tensor">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_patterns.td

    // Concat op patterns.
    //===----------------------------------------------------------------------===//
    
    def OneElementAttrPred
      : CPred<"$_self.cast<ElementsAttr>().getShapedType().getNumElements() == 1">;
    
    def OneElementAttr
      : ElementsAttrBase<And<[ElementsAttr.predicate, OneElementAttrPred]>,
                         "Scalar ElementsAttr">;
    
    def HasRankedFirstOperand
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 34.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      if (start_tensor && limit_tensor && delta_tensor) {
        // Operands should all be scalars
        assert(start_tensor.getShapedType().getRank() == 0 &&
               limit_tensor.getShapedType().getRank() == 0 &&
               delta_tensor.getShapedType().getRank() == 0);
        Type elem_type = getType().cast<ShapedType>().getElementType();
        if (elem_type.isSignlessInteger()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

    DenseIntElementsAttr TransposeFilterInConvolution(
        Location loc, PatternRewriter& rewriter,
        const DenseIntElementsAttr& filter_value_attr, const bool is_depthwise) {
      ArrayRef<int64_t> filter_shape = filter_value_attr.getShapedType().getShape();
      SmallVector<int8_t> filter_constant_values{
          filter_value_attr.getValues<int8_t>()};
      SmallVector<int8_t> new_filter_constant_values(filter_constant_values.size(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

      IntegerAttr intAttr = mlir::dyn_cast_or_null<IntegerAttr>(attr);
      if (auto elementAttr = mlir::dyn_cast_or_null<ElementsAttr>(attr)) {
        SmallVector<uint64_t, 1> index(elementAttr.getShapedType().getRank(), 0);
        intAttr = elementAttr.getValues<IntegerAttr>()[index];
      }
    
      assert(intAttr && "Invalid attribute passed to GetHLOAxisFromTFAxis");
    
      int64_t axis = intAttr.getInt();
      if (axis < 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top