Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for ranked_type (0.26 sec)

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

    // Returned attribute has integer elements of the given width.
    static Attribute ConvertShapeToAttr(Type input_ty, int out_width) {
      auto ranked_ty = input_ty.dyn_cast<RankedTensorType>();
      if (!ranked_ty || !ranked_ty.hasStaticShape()) return {};
    
      auto shape = ranked_ty.getShape();
      int rank = shape.size();
    
      SmallVector<APInt, 4> dimensions;
      dimensions.reserve(rank);
      for (int i = 0; i < rank; ++i)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

    // the given type.
    TensorType UpdateElementTypeTo(Type ty, Type element_ty) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
      if (!ranked_ty) {
        return UnrankedTensorType::get(element_ty);
      }
      return RankedTensorType::get(ranked_ty.getShape(), element_ty,
                                   ranked_ty.getEncoding());
    }
    
    template <typename SrcOpT, typename DstOpT>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

    // dimensions.
    bool IsBounded(Type ty) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
      if (!ranked_ty) return false;
    
      if (ranked_ty.hasStaticShape()) return true;
    
      auto encoding =
          mlir::dyn_cast_or_null<TypeExtensionsAttr>(ranked_ty.getEncoding());
      if (!encoding) return false;
    
      for (int i = 0; i < ranked_ty.getRank(); ++i) {
        if (ranked_ty.isDynamicDim(i) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

    bool IsBounded(Type ty) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
      if (!ranked_ty) return false;
    
      if (ranked_ty.hasStaticShape()) return true;
    
      auto encoding =
          mlir::dyn_cast_or_null<TypeExtensionsAttr>(ranked_ty.getEncoding());
      if (!encoding) return false;
    
      for (int i = 0; i < ranked_ty.getRank(); ++i) {
        if (ranked_ty.isDynamicDim(i) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

      }
    
      // Combine the result of each individual MatMul into a rank-3 tensor.
      Type packed_type = RankedTensorType::get(
          {bcast.output_batch_size(), rows, cols}, element_type);
      const auto axis = rewriter.getI64IntegerAttr(0);
      auto pack_op =
          rewriter.create<TF::PackOp>(loc, packed_type, /*values=*/matmuls, axis);
    
      // Reshape the rank-3 tensor into the correct output shape.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

        return f.isExactlyValue(value);
      });
    }
    
    // Returns true if the rank of the value equals to the given rank.
    bool RankEquals(Value value, int rank) {
      auto rank_type = mlir::dyn_cast<RankedTensorType>(value.getType());
      return (rank_type && rank_type.getRank() == rank);
    }
    
    #include "tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_patterns.inc"
    
    void FallbackToFlexOps::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

    // neither.
    mlir::RankedTensorType GetBufferType(mlir::Type ty) {
      auto ranked_ty = mlir::dyn_cast_or_null<mlir::RankedTensorType>(ty);
      if (!ranked_ty) return {};
    
      int64_t rank = ranked_ty.getRank();
      llvm::SmallVector<int64_t, 4> dims = llvm::to_vector<4>(ranked_ty.getShape());
      auto encoding = mlir::dyn_cast_or_null<mlir::mhlo::TypeExtensionsAttr>(
          ranked_ty.getEncoding());
      if (encoding && !encoding.getBounds().empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

    // to expand at the given `axis`.
    Type InferExpandDimsType(Type ty, int64_t axis, Builder *builder) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
    
      // Unranked type.
      if (!ranked_ty) return ty;
    
      auto shape = llvm::to_vector<4>(ranked_ty.getShape());
      if (axis < 0) axis += ranked_ty.getRank() + 1;
    
      shape.insert(shape.begin() + axis, 1);
      return tensorflow::GetTypeFromTFTensorShape(shape,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          limit = rewriter.getIntegerAttr(element_type, type.getShape()[dimension]);
          delta = rewriter.getIntegerAttr(element_type, 1);
        } else {
          return failure();
        }
    
        auto range_type =
            RankedTensorType::get({type.getShape()[dimension]}, element_type);
        Value start_op = rewriter.create<TF::ConstOp>(iota_op.getLoc(), start);
    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