Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for ShapedType (0.25 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

        if (!mlir::cast<ShapedType>(lhs.getType()).hasStaticShape() ||
            !mlir::cast<ShapedType>(rhs.getType()).hasStaticShape() ||
            !mlir::cast<ShapedType>(cond.getType()).hasStaticShape()) {
          return rewriteOpWithDynamicInput(op, rewriter);
        }
    
        auto lhs_shape = mlir::cast<ShapedType>(lhs.getType()).getShape();
        auto rhs_shape = mlir::cast<ShapedType>(rhs.getType()).getShape();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

          if (operands.size() != 1 || updates.size() != 1) return failure();
    
          ShapedType operand_type = mlir::cast<ShapedType>(operands[0].getType());
          ShapedType indices_type = mlir::cast<ShapedType>(indices.getType());
          ShapedType updates_type = mlir::cast<ShapedType>(updates[0].getType());
    
          Value new_updates = updates[0];
    
          // Can only convert with static shaped scatter.
    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/legalize_hlo_conversions/dot_general.cc

    Value ConvertDot(PatternRewriter& rewriter, Value lhs, Value rhs,
                     mhlo::DotDimensionNumbersAttr dot_dimension_numbers,
                     ShapedType result_type, mlir::Location loc) {
      auto lhs_type = mlir::cast<ShapedType>(lhs.getType());
      auto rhs_type = mlir::cast<ShapedType>(rhs.getType());
      const int lhs_rank = lhs_type.getRank();
      const int rhs_rank = rhs_type.getRank();
      ImplicitLocOpBuilder builder(loc, rewriter);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

    void BroadcastBatchDimensionsForBatchMatMul(OpBuilder &builder, Location loc,
                                                Value &input, Value &weight) {
      ShapedType input_type = mlir::cast<ShapedType>(input.getType());
      ShapedType weight_type = mlir::cast<ShapedType>(weight.getType());
      const int32_t input_rank = input_type.getRank();
      const int32_t weight_rank = weight_type.getRank();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc

        return builder.create<TF::ReshapeOp>(
            loc, RankedTensorType::get(shape, builder.getI32Type()), value,
            CreateConstValue<int64_t>(builder, loc, {rank}, shape));
      };
    
      ShapedType filter_shape = mlir::cast<ShapedType>(filter.getType());
      Value input_shape_value = builder.create<TF::ShapeOp>(
          loc, RankedTensorType::get({num_dims}, builder.getI32Type()), input);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tf_xla_op_to_tf_op.cc

      dot_dimension_numbers.ParseFromString(dot_dimension_numbers_str.str());
      SmallVector<Value> input_arguments = {lhs, rhs};
      const int lhs_rank = mlir::cast<ShapedType>(lhs.getType()).getShape().size();
      const int rhs_rank = mlir::cast<ShapedType>(rhs.getType()).getShape().size();
    
      const std::string einsum_equation =
          CreateEinsumEquation(dot_dimension_numbers, lhs_rank, rhs_rank);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.2K bytes
    - Viewed (0)
Back to top