Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ranked_type (0.24 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

    // Handles padding before convolution for space to depth transform.
    LogicalResult HandlePad(TF::PadOp op, int32_t kernel_size, int32_t block_size) {
      auto ranked_type = mlir::dyn_cast<RankedTensorType>(op.getInput().getType());
      if (!ranked_type) return failure();
      auto pad_input_shape = ranked_type.getShape();
      Location loc = op.getLoc();
      OpBuilder builder(op);
      builder.setInsertionPoint(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

    }
    
    // Converts the condition for an IfOp/WhileOp to a boolean value.
    Value ConvertConditionToBoolean(Operation* op, Value cond) {
      if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType()))
        if (ranked_type.getRank() == 0 &&
            ranked_type.getElementType().isSignlessInteger(1))
          return cond;
    
      OpBuilder builder(op);
      Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

          elem_type.isF32()) {
        zero = builder.getFloatAttr(elem_type, 0);
      } else {
        return false;
      }
      if (auto ranked_type = dyn_cast<RankedTensorType>(type)) {
        llvm::ArrayRef<int64_t> type_shape = ranked_type.getShape();
        for (int64_t i : type_shape) {
          if (i < 0) return false;
        }
        shape = builder.getI64TensorAttr(type_shape);
      } else {
        return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

        // verify shardings that actually break a tensor apart.
        return mlir::success();
      }
      if (RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(type)) {
        const int64_t tensor_rank = ranked_type.getRank();
        int tile_assignment_rank = sharding->tile_assignment_dimensions_size();
    
        // When a tensor is partial or subgroup tiled, its tile assignment will
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
Back to top