Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 87 for IntegerAttr (0.28 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

          ArrayAttr targs_attr = ArrayAttr::get(context, targs_values);
          attrs.push_back(
              NamedAttribute(StringAttr::get(context, "TArgs"), targs_attr));
    
          auto num_args_attr = IntegerAttr::get(IntegerType::get(context, 64), 1);
          attrs.push_back(
              NamedAttribute(StringAttr::get(context, "num_args"), num_args_attr));
    
          // Fused conv operands are input, filter, args and host args. Here, bias
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        SmallVector<int32_t, 4> perm;
        SmallVector<int64_t, 4> output_shape;
        for (int i = 0; i < num_dimensions; ++i) {
          perm.push_back(perm_tensor.getValues<IntegerAttr>()[i].getInt());
          output_shape.push_back(input_shape[perm[i]]);
    
          // Check that the derived output shape matches the static shape.
          assert(!output_type.hasStaticShape() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

        if (auto float_attr = mlir::dyn_cast_or_null<FloatAttr>(attr.second)) {
          fbb.Float(attr.first.data(), float_attr.getValue().convertToFloat());
        } else if (auto int_attr =
                       mlir::dyn_cast_or_null<IntegerAttr>(attr.second)) {
          fbb.Int(attr.first.data(), int_attr.getInt());
        } else if (auto bool_attr = mlir::dyn_cast_or_null<BoolAttr>(attr.second)) {
          fbb.Bool(attr.first.data(), bool_attr.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

      // If the validation fails, the pass should stop immediately.
      if (!IsLegalQuantSpecs(func)) {
        return true;
      }
    
      OpBuilder builder(func);
      bool is_signed = quant_specs_.IsSignedInferenceType();
      IntegerAttr num_bits =
          builder.getI32IntegerAttr(quant_specs_.GetQuantizationTypeWidth());
      BoolAttr narrow_range = builder.getBoolAttr(false);
    
      auto add_quantize_op = [&](Location loc, Type input_type, Block* block,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      DenseIntElementsAttr axis_attr;
      if (!matchPattern(op.getAxis(), m_Constant(&axis_attr))) return failure();
      if (axis_attr.getNumElements() != 1) return failure();
      int64_t axis =
          axis_attr.getSplatValue<IntegerAttr>().getValue().getSExtValue();
      // TODO(ezhulenev): Compute axis from rank. e.g. It might be common to concat
      // on the channels dim for NCHW layout as axis=-2.
      if (axis < 0) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

      // If the validation fails, the pass should stop immediately.
      if (!IsLegalQuantSpecs(func)) {
        return true;
      }
    
      OpBuilder builder(func);
      bool is_signed = quant_specs_.IsSignedInferenceType();
      IntegerAttr num_bits =
          builder.getI32IntegerAttr(quant_specs_.GetQuantizationTypeWidth());
      BoolAttr narrow_range = builder.getBoolAttr(false);
    
      auto add_quantize_op = [&](Location loc, Type input_type, Block* block,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

          stride_w = CastI64ToI32((*window_strides)[2]).value();
        }
        auto stride_h_attr = IntegerAttr::get(rewriter.getI32Type(), stride_h);
        auto stride_w_attr = IntegerAttr::get(rewriter.getI32Type(), stride_w);
    
        ArrayRef<int64_t> window_dims = op.getWindowDimensions();
        auto window_w_attr = IntegerAttr::get(rewriter.getI32Type(),
                                              CastI64ToI32(window_dims[2]).value());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

        if (squeeze_dims.size() != 1) {
          return rewriter.notifyMatchFailure(
              squeeze_op, "squeeze dims should have exactly 1 dimension specified");
        }
        int64_t squeeze_axis = mlir::cast<IntegerAttr>(squeeze_dims[0]).getInt();
        if (squeeze_axis < 0) {
          // Always squeeze 4D input to 3D input.
          squeeze_axis += 4;
        }
        if (squeeze_axis != expand_axis) {
          return rewriter.notifyMatchFailure(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      SmallVector<int32_t> stride_values, rhs_dilation_values;
      for (int64_t i : llvm::seq<int64_t>(1, num_dims - 1)) {
        stride_values.push_back(mlir::cast<IntegerAttr>(strides[i]).getInt());
        rhs_dilation_values.push_back(
            mlir::cast<IntegerAttr>(dilations[i]).getInt());
      }
      window_strides = Create1DConstValue<int32_t>(builder, loc, stride_values);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          float_spl && sgn_cst_spl) {
        return IsSign(float_spl.getValue(), sgn_cst_spl.getValue());
      }
      if (auto int_spl = llvm::dyn_cast_if_present<IntegerAttr>(splat),
          sgn_cst_spl = llvm::dyn_cast_if_present<IntegerAttr>(sgn_splat);
          int_spl && sgn_cst_spl) {
        return IsSign(int_spl.getValue(), sgn_cst_spl.getValue());
      }
      if (mlir::isa<DenseFPElementsAttr>(float_or_int)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
Back to top