Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 68 for DenseIntElementsAttr (0.24 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc

          new_shape[i] = shape[permutation[i]];
    
        return RankedTensorType::get(new_shape, ranked_type.getElementType());
      }
    
      return type;
    }
    
    bool AreCancellablePermutations(DenseIntElementsAttr perm0,
                                    DenseIntElementsAttr perm1) {
      if (perm0.getNumElements() == 0 || perm1.getNumElements() == 0) return false;
      if (perm0.getNumElements() != perm1.getNumElements()) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

    // changes which violates the constraint for the TransposeOp that the
    // input's and output's element type should be the same.
    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();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize.cc

      RankedTensorType type =
          mlir::dyn_cast_or_null<RankedTensorType>(input.getType());
      if (!type) return false;
    
      DenseIntElementsAttr axes_attr =
          mlir::dyn_cast_or_null<DenseIntElementsAttr>(axes);
      DenseIntElementsAttr shape_attr =
          mlir::dyn_cast_or_null<DenseIntElementsAttr>(shape);
      if (!axes_attr || !shape_attr) return false;
    
      if (shape_attr.getNumElements() != type.getRank()) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

        auto start_attr = rewriter.create<TF::ConstOp>(
            value.getLoc(),
            DenseIntElementsAttr::get(
                RankedTensorType::get({static_cast<int64_t>(start.size())},
                                      rewriter.getI64Type()),
                start));
        auto size_attr = rewriter.create<TF::ConstOp>(
            value.getLoc(),
            DenseIntElementsAttr::get(
                RankedTensorType::get({static_cast<int64_t>(size.size())},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

    // size -1 to HLO slice size.
    static DenseIntElementsAttr TFSliceSizes2HLOSliceSizes(
        Value input, Value start_indices, DenseIntElementsAttr slice_sizes,
        Builder *builder) {
      DenseIntElementsAttr constant_start_indices;
      if (!matchPattern(start_indices, m_Constant(&constant_start_indices))) {
        return mlir::cast<DenseIntElementsAttr>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

                                int64_t feature_dim, PatternRewriter &rewriter) {
      auto dims_type =
          RankedTensorType::get(/*shape=*/{1}, rewriter.getIntegerType(64));
      auto dims = DenseIntElementsAttr::get(dims_type, {feature_dim});
      if (shape_value) {
        return rewriter.createOrFold<mhlo::DynamicBroadcastInDimOp>(
            loc, result_type, value1d, shape_value, dims);
      }
      assert(result_type.hasStaticShape());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.h

    // Shuffle ranked tensor dimensions according to the permutation.
    Type ShuffleRankedTensorType(Type type, ArrayRef<int64_t> permutation);
    
    bool AreCancellablePermutations(DenseIntElementsAttr perm0,
                                    DenseIntElementsAttr perm1);
    
    // Default implementation of `LayoutSensitiveInterface::UpdateDataFormat` for
    // layout sensitive operations that do not have any additional layout dependent
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

            {}, getElementTypeOrSelf(axis_attr));
        DenseIntElementsAttr attr;
        if (axis_type.getElementType().isInteger(32)) {
          attr = DenseIntElementsAttr::get(axis_type, static_cast<int32_t>(axis));
        } else {
          assert(axis_type.getElementType().isInteger(64));
          attr = DenseIntElementsAttr::get(axis_type, axis);
        }
        auto axis_const = rewriter.create<TF::ConstOp>(loc, attr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

                        Value limit, Value delta) {
      assert(start.getType() == limit.getType());
      assert(start.getType() == delta.getType());
      DenseIntElementsAttr start_val;
      DenseIntElementsAttr limit_val;
      DenseIntElementsAttr delta_val;
      if (matchPattern(start, m_Constant(&start_val)) &&
          matchPattern(limit, m_Constant(&limit_val)) &&
          matchPattern(delta, m_Constant(&delta_val))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      int32_t pad_end = (pad_total / 2) / block_size;
      SmallVector<int32_t, 8> values = {0,       0,       pad_beg, pad_end,
                                        pad_beg, pad_end, 0,       0};
      auto paddings = DenseIntElementsAttr::get(padding_type, values);
      // Update pad_op paddings.
      op.setOperand(1, builder.create<TF::ConstOp>(loc, paddings));
    
      // Set input type.
      auto input = op.getOperand(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
Back to top