Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 151 for hasRank (0.13 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

        auto output_scale_type =
            mlir::dyn_cast<ShapedType>(op->getOperand(3).getType());
        if (!output_scale_type) {
          return failure();
        }
        if (output_scale_type.hasRank() && 0 < output_scale_type.getRank()) {
          output_quantization_axis = activation_quantization_axis;
        }
      }
      // For per-axis -> per-axis requantization, input and output quantization
      // axis must be equal.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

          // dimensions.
          ShapedType shaped_type =
              mlir::dyn_cast<ShapedType>(call_op->getOperand(0).getType());
          if (!shaped_type || !shaped_type.hasRank()) {
            return absl::InternalError("The input of BatchMatMul must have rank.");
          }
        } else if (function_name.contains("gather")) {
          // This op is guaranteed to be a constant as ODS checks IsConstTensor.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

        auto input_ty = mlir::cast<ShapedType>(input.getType());
        auto min_ty = mlir::cast<ShapedType>(min.getType());
        auto max_ty = mlir::cast<ShapedType>(max.getType());
    
        if (!input_ty.hasRank() || !min_ty.hasRank() || !max_ty.hasRank()) {
          return failure();
        }
    
        auto shape = rewriter.create<TF::ShapeOp>(
            op.getLoc(),
            tensorflow::GetTypeFromTFTensorShape({input_ty.getRank()},
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

        return rewriter.notifyMatchFailure(op, "op's data format isn't NHWC");
      }
    
      // Allow dynamic width and height dimensions only.
      auto result_ty = mlir::cast<TensorType>(op.getResult().getType());
      if (!result_ty.hasRank() || result_ty.getRank() != 4 ||
          result_ty.isDynamicDim(0) || result_ty.isDynamicDim(3)) {
        return rewriter.notifyMatchFailure(
            op, "only dynamic width and height dimensions are allowed");
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

          return failure();
        }
    
        if (!input_type.hasRank()) {
          LLVM_DEBUG(llvm::dbgs() << "Expected input_type to have rank.\n");
          return failure();
        }
        return success();
      }
    
      static LogicalResult MatchFilterCommonPattern(const Value filter) {
        auto filter_type = filter.getType().cast<TensorType>();
        if (!filter_type.hasRank()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        is_variable = true;
      }
    
      bool has_rank = type.hasRank();
    
      if (shape_signature.empty()) {
        return tflite::CreateTensor(
            builder_, builder_.CreateVector(shape), tflite_element_type,
            (is_variable ? 0 : buffer_idx), builder_.CreateString(name), q_params,
            /*is_variable=*/is_variable, s_params, /*shape_signature=*/0,
            /*has_rank=*/has_rank,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        for (const auto& axis_int : perm.getValues<APInt>()) {
          int64_t axis = axis_int.getSExtValue();
          if (axis < 0) {
            axis += input_type.getRank();
          }
          if (axis < 0 || (input_type.hasRank() && axis >= input_type.getRank())) {
            return transpose_op.emitOpError("perm must be in [-rank, rank)");
          }
          if (std::count(axes.begin(), axes.end(), axis) > 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/cluster_ops_by_policy.cc

      // Resolve constraints inferred from the tensor type.
      if (auto tensor = mlir::dyn_cast<TensorType>(value.getType())) {
        if (constraint == ValueConstraint::kRank && tensor.hasRank())
          return success();
        if (constraint == ValueConstraint::kShape && tensor.hasStaticShape())
          return success();
      }
    
      return failure();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

          ConversionPatternRewriter &rewriter) const override {
        Value lhs = adaptor.getLhs();
    
        auto lhs_type = mlir::cast<ShapedType>(lhs.getType());
        if (!lhs_type.hasRank()) {
          return rewriter.notifyMatchFailure(
              op, "Legalization supports cases where only lhs rank known.");
        }
    
        auto lhs_quant_type = GetUniformQuantizedType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

        return failure();
    
      auto input = splitv_op.getValue();
      auto input_type = mlir::dyn_cast_or_null<RankedTensorType>(input.getType());
      if (!input_type || !input_type.hasRank()) return failure();
    
      for (auto result : splitv_op.getResults()) {
        auto result_type = mlir::dyn_cast<RankedTensorType>(result.getType());
        if (result_type == nullptr) return failure();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
Back to top