Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 156 for RankedTensorType (0.21 sec)

  1. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

      auto create_z_x_transpose_op = [&](Value input) -> Value {
        RankedTensorType input_type = mlir::cast<RankedTensorType>(input.getType());
        const int input_rank = input_type.getRank();
    
        // Create a 1D I32 tensor for representing the dimension permutation.
        auto permuation_tensor_type =
            RankedTensorType::get({input_rank}, rewriter.getIntegerType(32));
        llvm::SmallVector<Attribute, 4> permute;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc

        auto create_z_x_transpose_op = [&](Value input) -> Value {
          RankedTensorType input_type =
              mlir::cast<RankedTensorType>(input.getType());
          const int input_rank = input_type.getRank();
    
          // Create a 1D I32 tensor for representing the dimension permutation.
          auto permuation_tensor_type =
              RankedTensorType::get({input_rank}, rewriter.getIntegerType(32));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc

        return builder.create<TF::ReshapeOp>(
            loc, RankedTensorType::get(shape, builder.getI32Type()), value,
            CreateConstValue<int64_t>(builder, loc, {rank}, shape));
      };
    
      ShapedType filter_shape = mlir::cast<ShapedType>(filter.getType());
      Value input_shape_value = builder.create<TF::ShapeOp>(
          loc, RankedTensorType::get({num_dims}, builder.getI32Type()), input);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/python/mlir_wrapper/types.cc

      py::class_<mlir::UnrankedTensorType, mlir::Type>(m, "UnrankedTensorType")
          .def("get", &mlir::UnrankedTensorType::get);
    
      py::class_<mlir::RankedTensorType, mlir::Type>(m, "RankedTensorType")
          .def("get", [](std::vector<int64_t> shape, mlir::Type ty) {
            return mlir::RankedTensorType::get(mlir::ArrayRef<int64_t>(shape), ty);
          });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 12 08:42:26 UTC 2021
    - 2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/perception_ops_utils_test.cc

        mlir::Builder* builder, const SmallVector<int64_t, 4>& input_shape,
        const SmallVector<int64_t, 4>& output_shape) {
      auto input_type = RankedTensorType::get(input_shape, builder->getF32Type());
      auto indices_type = RankedTensorType::get(input_shape, builder->getI64Type());
      auto output_type = RankedTensorType::get(output_shape, builder->getF32Type());
      SmallVector<mlir::Type, 2> input_types{input_type, indices_type};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

    Value GatherElements(Value indices, Value buffer, OpBuilder builder,
                         Location loc) {
      auto buffer_type = mlir::cast<RankedTensorType>(buffer.getType());
      auto result_shape = llvm::to_vector<8>(buffer_type.getShape());
      result_shape[0] =
          mlir::cast<RankedTensorType>(indices.getType()).getDimSize(0);
      int64_t maybe_contiguous_start = GetFirstIfIndicesAreContiguous(indices);
      if (maybe_contiguous_start >= 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tf_xla_op_to_tf_op.cc

    // `XlaGatherOp (https://www.tensorflow.org/xla/operation_semantics#gather). The
    // resulting type's shape has `tensor_type.size() + collapsed_dims.size()`
    // dimensions.
    RankedTensorType RestoreCollapsedDimensions(
        const RankedTensorType tensor_type,
        const absl::flat_hash_set<int64_t>& collapsed_dims) {
      ArrayRef<int64_t> original_tensor_shape = tensor_type.getShape();
      const int output_tensor_rank =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/lstm_utils.h

      Value weight_;
      Value bias_;
      Value projection_;
      bool couple_input_forget_gates_;
    
      // internal state
      Value weight_transposed_;
      Value projection_transposed_;
      RankedTensorType weight_type_;
      RankedTensorType projection_type_;
      int num_gates_;
      int n_cell_;
      int n_output_;
      int n_input_;
      int num_cols_weight_transposed_;
      int num_cols_projection_transposed_;
    
      // input -> cifg
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 03 00:14:05 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        auto filter = tf_op.getFilter();
        auto filter_type = mlir::dyn_cast<RankedTensorType>(filter.getType());
        if (!filter_type || filter_type.getRank() != 4 ||
            !filter_type.hasStaticShape())
          return failure();
    
        Value input = tf_op.getInput();
        RankedTensorType input_type =
            mlir::dyn_cast<RankedTensorType>(input.getType());
        // Only rank size four input will be only available by the tf.Conv2D
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/dynamic_shape_utils.cc

        return mlir::ShapedType::isDynamic(shape) ? kTFDynamicSize : shape;
      }));
    }
    
    mlir::RankedTensorType GetTypeFromTFTensorShape(llvm::ArrayRef<int64_t> shape,
                                                    mlir::Type elementType,
                                                    mlir::Attribute encoding) {
      return mlir::RankedTensorType::get(ConvertTFShapeToMlir(shape), elementType,
                                         encoding);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Nov 21 16:21:18 UTC 2022
    - 1.6K bytes
    - Viewed (0)
Back to top