Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for GetPaddingValue (0.3 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

      // Due to this, if the padding values in the input are equal, they will become
      // the same constant operator and the following check (which compares memory
      // addresses) works.
      if (pad_op.getPaddingValue() != parent_pad.getPaddingValue()) {
        return rewriter.notifyMatchFailure(
            pad_op, "parent and child pad have different padding values");
      }
    
      // NOTE: Because negative paddings are allowed, we assert that if
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

      const int dilation_h = mlir::cast<IntegerAttr>(dilations[1]).getInt();
      const int dilation_w = mlir::cast<IntegerAttr>(dilations[2]).getInt();
      return rewriter.getI64ArrayAttr({dilation_h, dilation_w});
    }
    
    Attribute GetPaddingValue(PatternRewriter& rewriter,
                              llvm::StringMap<Attribute>& identifier_to_attr) {
      llvm::StringRef padding =
          mlir::dyn_cast<StringAttr>(identifier_to_attr["padding"]).getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc

            GetInvertPermutedTensorType(pad_type, transpose_perm);
        Value new_pad = rewriter.create<stablehlo::PadOp>(
            pad_op.getLoc(), new_pad_type, transpose_input,
            pad_op.getPaddingValue(), new_padding_low, new_padding_high,
            new_padding_interrier);
    
        Value orig_pad = CreateTranspose(rewriter, new_pad, transpose_perm);
        rewriter.replaceOp(pad_op, orig_pad);
        return success();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 21:59:06 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

          padding_value.push_back(CastI64ToI32(padding_high[i]).value());
        }
    
        TensorType output_type = op.getResult().getType().cast<TensorType>();
        Value constant_values = op.getPaddingValue();
        auto padding_attr = DenseIntElementsAttr::get(padding_type, padding_value);
        auto padding =
            rewriter.create<arith::ConstantOp>(op.getLoc(), padding_attr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

        return false;
      if (ExtractSingleElementAsInteger(num_cols).getInt() != -1) return false;
    
      // Verify padding_value is a tensor with all 0s.
      mlir::Value padding_value = tf_matrix_diag_v2_or_v3_op.getPaddingValue();
      mlir::Type element_type =
          mlir::cast<ShapedType>(padding_value.getType()).getElementType();
      if (mlir::isa<FloatType>(element_type)) {
        DenseFPElementsAttr padding_attr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

      auto new_pad_op = rewriter.create<TF::PadV2Op>(
          loc, pad_op.getType().clone(pad_output_shape), pad_op.getOperand(),
          padding_amount_const_op, pad_op.getPaddingValue());
      if (!has_negative_padding_amount) {
        return new_pad_op;
      }
    
      // Convert negative padding amount into slice.
      auto slice_attr_type = RankedTensorType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

                                                 rewriter.getIntegerType(1)),
            in_bounds, GetI64ElementsAttr(broadcast_bounds, &rewriter));
        Value b_padding = rewriter.create<BroadcastOp>(
            loc, op.getPaddingValue(), GetI64ElementsAttr(output_shape, &rewriter));
    
        // Replace all out-of-bounds values in the result with padding_value.
        Value result =
            rewriter.create<SelectOp>(loc, b_in_bounds, gather, b_padding);
    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