Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 133 for getShape (0.22 sec)

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

        // Reshape input image to add a new spatial dimension.
        auto image_type = mlir::cast<ShapedType>(conv_op.getLhs().getType());
        SmallVector<int64_t, 4> image_2d_shape(image_type.getShape().begin(),
                                               image_type.getShape().end());
        image_2d_shape.push_back(1);
        auto image_2d_type =
            RankedTensorType::get(image_2d_shape, image_type.getElementType());
        auto loc = conv_op.getLoc();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        const int num_dimensions = input_tensor.getShapedType().getRank();
        assert(perm_tensor.getType().getNumElements() == num_dimensions);
    
        ArrayRef<int64_t> input_shape = input_tensor.getShapedType().getShape();
        auto output_type = mlir::cast<ShapedType>(op.getOutput().getType());
    
        SmallVector<int32_t, 4> perm;
        SmallVector<int64_t, 4> output_shape;
        for (int i = 0; i < num_dimensions; ++i) {
    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/tf2xla/transforms/legalize_tf.cc

        SmallVector<int64_t, 4> split_updates_shape;
        split_updates_shape.append(updates_type.getShape().begin(),
                                   updates_type.getShape().end());
        split_updates_shape.front() = 1;
        SmallVector<Type, 4> split_updates_type;
        split_updates_type.resize(
            updates_type.getShape().front(),
            tensorflow::GetTypeFromTFTensorShape(split_updates_shape,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

          return failure();
        }
    
        auto current_out_type =
            llvm::dyn_cast<RankedTensorType>(op->getResult(0).getType());
        auto new_out_type = RankedTensorType::get(
            PermuteShape(current_out_type.getShape(), inverse_perm_arr),
            current_out_type.getElementType());
    
        // Create new ewise op to appear before the tranpose.
        auto *new_ewise_op =
            rewriter.create(op->getLoc(), op->getName().getIdentifier(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

        if (rhs_shape_type.hasRank()) {
          shape.append(rhs_shape_type.getShape().begin(),
                       rhs_shape_type.getShape().end());
          refined_shape = true;
        }
      } else if (rhs_shape_type.hasRank()) {
        for (auto shape_elts : llvm::enumerate(
                 llvm::zip(lhs_shape_type.getShape(), rhs_shape_type.getShape()))) {
          if (ShapedType::isDynamic(std::get<0>(shape_elts.value())) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

        }
      }
    
      auto ranked_type = mlir::dyn_cast<RankedTensorType>(result_type);
      if (!ranked_type) return UnrankedTensorType::get(builder->getI1Type());
    
      return RankedTensorType::get(ranked_type.getShape(), builder->getI1Type());
    }
    
    Type InferReductionOpType(Value input, Value reduction_indices,
                              BoolAttr keep_dims) {
      Type input_ty = input.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

        const auto [input_height, input_width] =
            GetDimSize(op->getOperand(0).getType().cast<ShapedType>().getShape(),
                       dimension_numbers.getInputSpatialDimensions());
        const auto [output_height, output_width] =
            GetDimSize(op->getResult(0).getType().cast<ShapedType>().getShape(),
                       dimension_numbers.getOutputSpatialDimensions());
    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/quantization/tensorflow/passes/prepare_lifting.td

    def HasEqualShape : Constraint<CPred<
      "$0.getType().cast<ShapedType>().hasRank() && "
      "$1.getType().cast<ShapedType>().hasRank() && "
      "$0.getType().cast<ShapedType>().getShape() == $1.getType().cast<ShapedType>().getShape()">,
      "Checks if the shapes of tensors are same.">;
    
    // Make the 1D value $0 broadcastable with the shape of $1.
    def MakeOneDimValueBroadcastable : NativeCodeCall<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 03:24:59 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

          auto scatter_dims_to_operand_dims =
              scatter_dimension_numbers.getScatterDimsToOperandDims();
    
          if (IsIotaAttr(inserted_window_dims, indices_type.getShape().back()) &&
              IsIotaAttr(scatter_dims_to_operand_dims,
                         indices_type.getShape().back())) {
            rewriter.replaceOpWithNewOp<TfOp>(scatter_op,
                                              scatter_op.getResult(0).getType(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

      auto input_type = mlir::cast<mlir::TensorType>(src_input.getType());
    
      if (input_type.hasRank()) {
        if (input_type.getShape()[split_dimension] == mlir::ShapedType::kDynamic) {
          output_type = input_type;
        } else {
          auto shape = llvm::to_vector<4>(input_type.getShape());
          if (shape[split_dimension] % num_split != 0) {
            return mlir::emitError(
                location,
                llvm::formatv(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
Back to top