Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 133 for ShapedType (0.13 sec)

  1. tensorflow/compiler/mlir/lite/utils/variables_utils.h

    // Returns true if 'op' has type that is supported by native TFLite
    // variables.
    bool IsSupportedVariableType(Operation* op);
    
    // Returns true if 'type' is supported by native tflite variables.
    bool IsSupportedVariableType(ShapedType type);
    
    }  // namespace utils
    }  // namespace TFL
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 1.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/export_tf_dialect_op.cc

      }
    
      // Here we only add the shapes for the leading values with ShapedType,
      // assuming values with non-ShapedType are put at the end of the result.
      if (!ignore_unregistered_attrs && inst->getNumResults() > 0) {
        auto values = inst->getResults();
        auto begin = values.begin();
        auto end = values.begin();
        while (end != values.end() && mlir::isa<mlir::ShapedType>((*end).getType()))
          end++;
        if (begin != end) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/optimize.td

      CPred<"$0.getType().isa<RankedTensorType>()">,
      CPred<"!$0.getType().cast<ShapedType>().isDynamicDim( "
      "  $0.getType().cast<RankedTensorType>().getRank() - 1)">]>>;
    
    def IsNotComplexType : Constraint<And<[
      CPred<"$0.getType().isa<RankedTensorType>()">,
      CPred<"!$0.getType().cast<ShapedType>().getElementType().isa<ComplexType>()">
    ]>>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 22 07:31:23 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h

        // we have separate ops for them. If only one of them is used then the other
        // one will be garbage collected later.
        if (!mlir::isa<ShapedType>(operand.getType())) return failure();
        auto operand_type = mlir::cast<ShapedType>(operand.getType());
        if (operand_type.getElementType().isInteger(1)) {
          // TF does not support min or max on boolean (int1) arguments.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/utils/bfloat16_type.cc

    bool IsLargeFloatType(Type type) {
      type = getElementTypeOrSelf(type);
      return isa<FloatType>(type) && type.getIntOrFloatBitWidth() > 16;
    }
    
    Type ToBfloat16Type(Type type) {
      if (auto shaped = mlir::dyn_cast<ShapedType>(type)) {
        const Type elem = shaped.getElementType();
        if (IsLargeFloatType(elem)) {
          return shaped.clone(BFloat16Type::get(type.getContext()));
        }
      } else if (IsLargeFloatType(type)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

          }
        } else if (function_name.contains("batch_matmul")) {
          // For BatchMatMul, the input must be ranked to determine the batch
          // 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.");
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

      std::string device_type_;
      bool prefer_tf2xla_;
      bool use_tf2xla_hlo_importer_;
    };
    
    bool ShouldRefineTypeTo(Type original_ty, Type updated_ty) {
      auto updated = mlir::dyn_cast<ShapedType>(updated_ty);
      auto original = mlir::dyn_cast<ShapedType>(original_ty);
    
      // Both types must be shaped types.
      if (!original || !updated) return false;
    
      // Element types must match.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

        auto transpose_op = *transpose_ops.begin();
        auto result_type =
            mlir::dyn_cast_or_null<ShapedType>(transpose_op.getResult().getType());
        auto is_valid_move =
            llvm::all_of(op->getOperands(), [result_type](Value operand) -> bool {
              auto operand_type =
                  mlir::dyn_cast_or_null<ShapedType>(operand.getType());
              return result_type && operand_type && result_type.hasRank() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc

    namespace tensorflow {
    
    using llvm::ArrayRef;
    using llvm::SmallVector;
    using mlir::Builder;
    using mlir::DenseStringElementsAttr;
    using mlir::ElementsAttr;
    using mlir::RankedTensorType;
    using mlir::ShapedType;
    using mlir::Type;
    using tensorflow::errors::InvalidArgument;
    
    static TensorProto ConvertToProto(const Tensor& input_tensor,
                                      bool use_tensor_content = true) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

          if (!cast_op || cast_op.getResult().use_empty()) continue;
    
          // Get types
          Type old_result_type = op.getResult().getType();
          ShapedType new_result_type =
              mlir::dyn_cast<ShapedType>(cast_op.getType());
    
          // Proceeds only if the casting is to float16
          if (!new_result_type.getElementType().isF16()) continue;
    
          // Cast values
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top