Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for getRank (0.57 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

      for (auto idx : val1_indices) {
        if (idx < 0) idx = idx + val1_shape.getRank();
        if (idx >= val1_shape.getRank() || val1_shape.isDynamicDim(idx)) {
          return false;
        }
        val1_result *= val1_shape.getDimSize(idx);
      }
    
      for (auto idx : val2_indices) {
        if (idx < 0) idx = idx + val2_shape.getRank();
        if (idx >= val2_shape.getRank() || val2_shape.isDynamicDim(idx)) {
          return false;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

      const std::vector<int> kValidNumOfOutput = {1, 2, 3};
      if (input_type.getRank() >= kValidNumOfOutput.size()) {
        return func.emitError()
               << "Unrecognized input rank: " << input_type.getRank();
      }
      if (func.getNumResults() != kValidNumOfOutput[input_type.getRank()]) {
        return func.emitError()
               << "Expect " << kValidNumOfOutput[input_type.getRank()]
               << "output(s) when input has rank " << input_type.getRank();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/dot_general.cc

      auto operand_shape = builder.create<TFL::ShapeOp>(
          RankedTensorType::get(static_cast<int32_t>(operand_type.getRank()),
                                builder.getIntegerType(32)),
          operand);
      const int64_t operand_rank = operand_type.getRank();
      // Compute flattened out dimension and contracting dimension using
      // TFL::UnsortedSegmentProdOp.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      if (!output_type) return failure();
    
      // bias should be a vector sized of the last output dim.
      int64_t num_units = output_type.getDimSize(output_type.getRank() - 1);
      auto bias_type =
          mlir::RankedTensorType::get({num_units}, output_type.getElementType());
    
      mlir::DenseElementsAttr bias_attr;
      if (output_type.getElementType().isF32()) {
        float val = 0.0;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

    }
    
    PermutationAndShape GetPermutationAndTransposedShape(
        llvm::ArrayRef<int64_t> permutation_array, ShapedType input_type,
        ConversionPatternRewriter& rewriter) {
      assert(permutation_array.size() == input_type.getRank());
      llvm::SmallVector<int64_t> transposed_shape(permutation_array.size());
      for (int64_t i = 0; i < permutation_array.size(); ++i) {
        transposed_shape[i] = input_type.getDimSize(permutation_array[i]);
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

      if (!lhs_type.hasRank() || !rhs_type.hasRank()) {
        return rewriter.notifyMatchFailure(op, "unsupported unranked input type");
      }
      if (lhs_type.getRank() < 1 || 2 < lhs_type.getRank() ||
          rhs_type.getRank() < 1 || 2 < rhs_type.getRank()) {
        return rewriter.notifyMatchFailure(
            op,
            "unsupported dot operation type; operands must be vectors or "
            "matrices");
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

              permutation_and_shape.shape.getRank() - inserted_window_dims.size();
          int64_t num_updates = indices_type.getDimSize(0);
          // For TF::TensorScatterUpdateOp, `indices` must have at least 2 axes:
          // `(num_updates, index_depth)`. Reshape indices and updates if necessary.
          if (std::is_same<TfOp, TF::TensorScatterUpdateOp>::value &&
              indices_type.getRank() == 1 && updates_type.getRank() == 1 &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

            llvm::dyn_cast<RankedTensorType>(tpose_arg1->getResultTypes()[0]);
        auto tpose_arg2_type =
            llvm::dyn_cast<RankedTensorType>(tpose_arg2->getResultTypes()[0]);
        if (tpose_arg1_type.getRank() != tpose_arg2_type.getRank()) {
          return failure();
        }
    
        if (llvm::isa<BlockArgument>(tpose_arg1.getPerm()) ||
            llvm::isa<BlockArgument>(tpose_arg2.getPerm())) {
          return failure();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc

        // Compute mean
        int64_t input_last_dim = input_type.getRank() - 1;
        auto dims_type = RankedTensorType::get(/*shape=*/{input_last_dim},
                                               rewriter.getIntegerType(32));
        ::mlir::SmallVector<int32_t> reduce_dim_axes;
        for (int i = 0; i < input_type.getRank(); ++i) {
          if (i != feature_index) {
            reduce_dim_axes.push_back(i);
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top