Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 151 for hasRank (0.16 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.td

      (CreateXlaDotV2OpFromTfMatMulOp
        $input, $weight, $input_zp, $weight_zp, $matmul, $transpose_a, $transpose_b),
      [(IsInt8ElementType $input),
       (IsInt8ElementType $weight),
       (HasRank $input),
       (HasRank $weight),
       (HasRankOf<0> $input_zp),
       (HasRankOf<0> $weight_zp),
       (IsInt32ElementType $matmul)],
      [], (addBenefit 10)>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Dec 10 05:52:02 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

        size *= std::max(kDefaultCheapCost, dim);
      }
    
      return size;
    }
    
    int64_t InferTensorSize(const CostContext& context, mlir::TensorType type) {
      if (type.hasRank()) return GetRankedTensorSize(type);
      return context.default_unranked_tensor_size;
    }
    
    // The cost function for tf.LookupTableFindV2.
    int64_t InferLookupTableFindV2Cost(const CostContext& context,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

            !mlir::isa<StringType>(output_values.getElementType())) {
          return func.emitError()
                 << "Output " << kValues << " should be a string tensor";
        }
    
        if (input_values.hasRank() && output_values.hasRank() &&
            input_values.getRank() != output_values.getRank()) {
          return func.emitError() << "Input " << kValues << " and output "
                                  << kValues << " should have the same rank";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td

    def AreTheSameValue : Constraint<
      CPred<"$0 == $1">>;
    
    // Checks if the value has rank.
    def HasRank : Constraint<
      CPred<"$0.getType().cast<ShapedType>().hasRank()">>;
    
    // Checks if the value has rank of `n`.
    class HasRankOf<int n> : Constraint<
      CPred<"$0.getType().cast<ShapedType>().hasRank() && "
            "$0.getType().cast<ShapedType>().getRank() == " # n>,
      "Checks if the value has rank of 'n'.">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 04:55:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/export_utils.h

    // ShapeContainerT is any type with the following methods:
    //   bool hasRank()
    //   ArrayRef<int64_t> getShape()
    // This includes mlir::TF::ShapeAttr and mlir::ShapedType.
    template <typename ShapeContainerT>
    void SetTensorShapeProto(ShapeContainerT shape, TensorShapeProto* proto) {
      if (shape.hasRank()) {
        for (int64_t dim : shape.getShape()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.td

    def ReshapeTo1DTensor : NativeCodeCall<
      "quant::ReshapeTo1DTensor($_builder, $_loc, $0)">;
    
    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.">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 03:24:59 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      auto input_shape = mlir::cast<ShapedType>(input.getType());
      auto filter_shape = mlir::cast<ShapedType>(filter.getType());
      if (!input_shape.hasRank() || input_shape.getRank() != 4 ||
          !filter_shape.hasRank() || filter_shape.getRank() != 4) {
        emitError(loc, "input and filter are expected to be 4D tensors");
        return {};
      }
    
      const int feature_group_cnt =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc

        auto input_type = mlir::cast<ShapedType>(op.getInput().getType());
        auto output_type = mlir::cast<ShapedType>(op.getOutput().getType());
    
        if (!input_type.hasRank() || !output_type.hasRank()) return failure();
    
        // The pattern attempts to reduce the rank of the input to BroadcastTo.
        // Thus, we fail to match if the consuming reshape rank is larger.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

                             ArrayRef<int> val2_indices) {
      ShapedType val1_shape = mlir::cast<ShapedType>(val1.getType());
      ShapedType val2_shape = mlir::cast<ShapedType>(val2.getType());
      if (!val1_shape.hasRank() || !val2_shape.hasRank()) return false;
    
      int val1_result = 1;
      int val2_result = 1;
      for (auto idx : val1_indices) {
        if (idx < 0) idx = idx + val1_shape.getRank();
    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_ops_n_z.cc

      // If data is unranked or data_rank is 0, this will remain -2. Otherwise
      // refers to first dimension of then and/or else.
      int64_t data_first_dim = -2;
      bool then_has_rank = then_tensor.hasRank();
      bool else_has_rank = else_tensor.hasRank();
      if (then_has_rank && else_has_rank) {
        data_rank = then_tensor.getRank();
        if (then_tensor.getRank() > 0)
          data_first_dim = then_tensor.getShape().front();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
Back to top