Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 222 for getRank (0.18 sec)

  1. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

          ").getType().cast<ShapedType>().getRank() >= " # m>]>>;
    
    class TFL_OperandHasRankRange<int n, int x, int y> :
      PredOpTrait<"operand " # n # " has rank range [" # x # ", " # y # "]",
        Or<[TFL_OperandIsUnrankedPred<n>,
          CPred<"$_op.getOperand(" # n # ").getType().cast<ShapedType>().getRank() "
          ">= " # x # " && $_op.getOperand(" # n # ").getType().cast<ShapedType>()."
          "getRank() <= " # y>]>>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K 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/transforms/legalize_tf_patterns.td

      "GetHLOAxisFromTFAxis("
      "$0, $1.getType().cast<RankedTensorType>().getRank(), &$_builder)">;
    
    // Same as the above but with $1 of type operand_range from variadic TensorFlow
    // input.
    def GetHLOAxisFromTFAxisVariadic : NativeCodeCall<
      "GetHLOAxisFromTFAxis("
      "$0, (*$1.begin()).getType().cast<RankedTensorType>().getRank(), "
      "&$_builder)">;
    
    def CastElementsToI64Elements : NativeCodeCall<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 34.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

                             (TFL_TopKV2Op $input, $k)>;
    
    def ReductionDimensionIsLastDim : Constraint<CPred<"($0.cast<IntegerAttr>().getInt() == "
      "$1.getType().cast<ShapedType>().getRank() - 1 || $0.cast<IntegerAttr>().getInt() == -1)">>;
    
    // Legalizes TF_ApproxTopKOp to TFL_TopKV2Op with the following constraints:
    //    1. It computes max k
    //    2. The reduction dimension is the last dim of the input.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    // `ShapedType` or its rank is unknown.
    inline bool HasRankOf(Value value, const int64_t rank) {
      auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(value.getType());
      return shaped_type && shaped_type.hasRank() && shaped_type.getRank() == rank;
    }
    
    // Creates a new type that has the shape from the `old_type` and the element
    // type from the `element_type`.
    Type CloneTypeWithNewElementType(Type old_type, Type element_type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

            return (constant.getType().getRank() == 2);
          };
    
      auto op = cast<BatchMatMulOpType>(bmm_op);
    
      // Create a tfl.transpose op that performs ZX transpose on `input`.
      auto create_z_x_transpose_op = [&](Value input) -> Value {
        RankedTensorType input_type = mlir::cast<RankedTensorType>(input.getType());
        const int input_rank = input_type.getRank();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

        return op.emitError("lhs must have static shape.");
      }
      if (!rhs_shape.hasStaticShape()) {
        return op.emitError("rhs must have static shape.");
      }
    
      const int64_t padding_nums_size = 2 * (rhs_shape.getRank() - 2);
      padding_nums.reserve(padding_nums_size);
      if (conv_padding.strref() == "EXPLICIT") {
        for (auto padding_elem :
             op.getExplicitPaddingAttr().template getAsRange<IntegerAttr>()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h

      }
      return success();
    }
    
    inline ShapedType MergeType(ShapedType a, ShapedType b) {
      if (!a.hasRank()) {
        return b;
      }
      if (!b.hasRank()) {
        return a;
      }
      int64_t rank = a.getRank();
      SmallVector<int64_t, 4> dims;
      dims.resize(rank);
      for (int i = 0, e = rank; i != e; i++) {
        int64_t dim0 = a.getDimSize(i);
        int64_t dim1 = b.getDimSize(i);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc

    // packed_value = bitwise_or(packed_low, packed_high)
    Value PackOperand(OpBuilder &builder, Location loc, Value value, int pack_dim) {
      ShapedType value_type = mlir::cast<ShapedType>(value.getType());
      const int rank = value_type.getRank();
    
      SmallVector<int64_t> packed_shape(value_type.getShape().begin(),
                                        value_type.getShape().end());
      RankedTensorType shape_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_op_base.td

          CPred<"$_op.getOperand(" # n #
          ").getType().cast<ShapedType>().getRank() == " # m>]>>;
    
    // Returns true if the n-th result has unknown rank or has rank m.
    class TF_ResultHasRank<int n, int m> :
      PredOpTrait<"result " # n # " is " # m # "-D",
        Or<[TF_ResultIsUnrankedPred<n>,
          CPred<"$_op.getResult(" # n #
          ").getType().cast<ShapedType>().getRank() == " # m>]>>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 30.5K bytes
    - Viewed (0)
Back to top