Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 133 for ShapedType (0.11 sec)

  1. tensorflow/compiler/mlir/lite/utils/utils.td

      "TFL::IsTransposeTrivial($0.getType().cast<ShapedType>().getShape(), $1)">>;
    
    // Constraint that checks if the reshape op is equivalent to a transpose op.
    // This is true if the reshape op is a trivial reshape op, meaning no change in
    // the order of non-identity dimensions.
    def IsReshapeEquivalentToTranspose : Constraint<CPred<
      "TFL::IsReshapeEquivalentToTranspose("
        "$0.getType().cast<ShapedType>(),"
        "$1.getType().cast<ShapedType>())">>;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/variables_utils.cc

    bool IsSupportedVariableType(Operation* op) {
      ShapedType type;
      if (llvm::isa<TF::ReadVariableOp>(op)) {
        type = op->getResult(0).getType().cast<ShapedType>();
      } else if (llvm::isa<TF::AssignVariableOp>(op)) {
        type = op->getOperand(1).getType().cast<ShapedType>();
      } else if (llvm::isa<TF::VarHandleOp>(op)) {
        type = op->getResult(0)
                   .getType()
                   .cast<ShapedType>()
                   .getElementType()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

    LogicalResult VerifyTypesCompatibility(Operation::operand_type_range types,
                                           bool mask_one_dim, Operation *op) {
      int64_t common_rank = ShapedType::kDynamic;
      llvm::SmallVector<int64_t, 4> common_dims;
      int64_t dim_to_mask = ShapedType::kDynamic;
    
      // Initialize common_rank with rank of the first ranked type and verify that
      // following ranked types have the same rank.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/utils.h

      return shaped_type.clone(new_shape);
    }
    
    // Returns a ShapedType for a permutation and the shape of input after
    // applying the permutation to the given shape through a transpose.
    inline ShapedType GetTransposedType(Value input,
                                        llvm::ArrayRef<int64_t> permutation_array) {
      auto input_type = input.getType().cast<ShapedType>();
      if (permutation_array.size() != input_type.getRank()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

    // indices in `val2`.
    bool HasEqualElementSize(Value val1, Value val2, ArrayRef<int> val1_indices,
                             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;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          ConversionPatternRewriter& rewriter) const final {
        ShapedType operand_type = mlir::cast<ShapedType>(op.getOperand().getType());
        ShapedType update_type =
            mlir::dyn_cast_or_null<ShapedType>(op.getUpdate().getType());
        ShapedType start_indices_type = mlir::dyn_cast_or_null<ShapedType>(
            op.getStartIndices().front().getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.td

      CPred<"quant::ReshapableTo1DTensor($0.getType().cast<ShapedType>())">,
      "Checks if the value dims are all ones except the right most dim">;
    
    def ReshapeTo1DTensor : NativeCodeCall<
      "quant::ReshapeTo1DTensor($_builder, $_loc, $0)">;
    
    def HasEqualShape : Constraint<CPred<
      "$0.getType().cast<ShapedType>().hasRank() && "
      "$1.getType().cast<ShapedType>().hasRank() && "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 14 03:24:59 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

    OpFoldResult IdentityArithmeticOpFolder(OpT arithmetic_op,
                                            ArrayRef<Attribute> operands) {
      auto lhs_type = mlir::cast<ShapedType>(arithmetic_op.getX().getType());
      auto rhs_type = mlir::cast<ShapedType>(arithmetic_op.getY().getType());
      auto result_type =
          mlir::cast<ShapedType>(arithmetic_op.getResult().getType());
    
      // We can fold arithmetic operation only of we can prove that we will not
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

    // logics.
    std::optional<TF::PartitionedCallOp> RegisterOperationsInFuncOp(
        StringRef func_name, PatternRewriter& rewriter, QuantizedType quant_type,
        Value input_val, ShapedType result_type,
        std::function<Operation*(PatternRewriter&, Operation*, Value, ShapedType,
                                 QuantizedType)>
            quantization_operations_func) {
      Operation* input_op = input_val.getDefiningOp();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc

        const float ratio_threshold) {
      ElementsAttr attr;
      ShapedType type;
      InspectResult result = {};
      if (auto cst = dyn_cast<ConstOp>(inst)) {
        attr = cst.getValue();
        type = mlir::cast<ShapedType>(cst.getType());
      } else if (auto cst = dyn_cast<QConstOp>(inst)) {
        attr = cst.getValue();
        type = mlir::cast<ShapedType>(cst.getType());
      } else {
        result.can_compress = false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.1K bytes
    - Viewed (0)
Back to top