Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 156 for RankedTensorType (0.79 sec)

  1. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

    // dimentions of the tensor
    def GetPrefixTruncatedShape: NativeCodeCall<"GetShape($0, true)">;
    
    // Returns True if the operand type is RankedTensorType and valid.
    def HasValidRankedTensor : Constraint<CPred<
      "$0.getType().isa<RankedTensorType>() && "
      "$0.getType().cast<RankedTensorType>().getNumDynamicDims() <= 1">>;
    
    // Check if the truncated shape of the lhs is equal to the shape of rhs
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

        return f.isExactlyValue(value);
      });
    }
    
    // Returns true if the rank of the value equals to the given rank.
    bool RankEquals(Value value, int rank) {
      auto rank_type = mlir::dyn_cast<RankedTensorType>(value.getType());
      return (rank_type && rank_type.getRank() == rank);
    }
    
    #include "tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_patterns.inc"
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/canonicalize.td

    // BatchToSpace op patterns.
    //===----------------------------------------------------------------------===//
    
    def BatchToSpaceBlockSizeToBlockShape : NativeCodeCall<
      "DenseElementsAttr::get(RankedTensorType::get({2}, $_builder.getI64Type()), "
      "ArrayRef<APInt>{$0.getValue(), $0.getValue()})">;
    
    def BatchToSpaceToBatchToSpaceND : Pat<
      (TF_BatchToSpaceOp:$src $input, $crops, $block_size),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 06 18:42:28 UTC 2023
    - 17K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

        // final_op = "Div"
        llvm::SmallVector<int64_t> indices(group_size.getInt());
        std::iota(indices.begin(), indices.end(), 0);
    
        auto replica_groups = mlir::DenseIntElementsAttr::get(
            mlir::RankedTensorType::get({1, group_size.getInt()},
                                        rewriter.getI64Type()),
            indices);
    
        {
          // TODO(b/226201111): Stop emitting CollectiveInfo when it is no longer
          // needed.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

            return failure();
    
          OpBuilder builder(op);
          auto const_op = builder.create<TF::ConstOp>(
              op->getLoc(), DenseIntElementsAttr::get(
                                RankedTensorType::get({}, builder.getI64Type()),
                                {device_ordinal}));
          op->replaceAllUsesWith(const_op);
          op->erase();
          return WalkResult::advance();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

      return success();
    }
    
    // Returns true if the given type is a ranked tensor type with static or
    // bounded dimensions.
    bool IsBounded(Type ty) {
      auto ranked_ty = mlir::dyn_cast<RankedTensorType>(ty);
      if (!ranked_ty) return false;
    
      if (ranked_ty.hasStaticShape()) return true;
    
      auto encoding =
          mlir::dyn_cast_or_null<TypeExtensionsAttr>(ranked_ty.getEncoding());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

      SmallVector<Location> arg_locs;
    
      // Add an argument for platform_index. This allows for multiple platforms.
      // TODO: b/310291615 - find a better way for platform support.
      arg_types.push_back(RankedTensorType::get({}, builder.getI32Type()));
      arg_locs.push_back(module_op.getLoc());
      for (const Value input_value : inputs) {
        arg_types.push_back(input_value.getType());
        arg_locs.push_back(input_value.getLoc());
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

                  "Expected 64-bit integer array attributes!");
            vals.push_back(i.getInt());
          }
          mlir::OpBuilder builder(attr.getContext());
          mlir::TensorType ty =
              mlir::RankedTensorType::get(vals.size(), builder.getIntegerType(64));
          TensorProto tensor;
          TF_RETURN_IF_ERROR(ConvertToTensorProto(
              mlir::DenseIntElementsAttr::get(ty, vals), &tensor));
          *list->add_tensor() = tensor;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_patterns.td

    class GetRankedScalarAttr<string prefix, int width, string signed, string value> :
      NativeCodeCall<"DenseElementsAttr::get<" # prefix # "int" # width # "_t>("
        "RankedTensorType::get({}, $_builder.getIntegerType("
          # width # signed # "))," # value # ")">;
    
    def : Pat<(MHLO_NotOp TF_Int8Tensor:$input),
                (TF_BitwiseXorOp $input,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Feb 03 08:58:22 UTC 2024
    - 34K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_op_base.td

                y.getType().cast<ShapedType>().getShape(), resultShape)) {
          mlir::emitError($_state.location,
                          "operands have no broadcastable shapes");
        }
    
        resultType = RankedTensorType::get(resultShape, $_builder.getI1Type());
      }
      return build($_builder, $_state, resultType, x, y);
    }]>];
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 30.5K bytes
    - Viewed (0)
Back to top