Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 133 for ShapedType (0.27 sec)

  1. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    bool HasStaticShapeAtDims(Value value, ArrayRef<int> dims);
    
    // Whether `value` has known rank of `rank`. Returns false when it is not a
    // `ShapedType` or its rank is unknown.
    inline bool HasRankOf(Value value, const int64_t rank) {
      auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(value.getType());
      return shaped_type && shaped_type.hasRank() && shaped_type.getRank() == rank;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

    Type TypeMeet(Type lhs, Type rhs) {
      DCOMMENT("RefineTypeWith : " << lhs << " : " << rhs);
      if (lhs == rhs) return lhs;
    
      auto rhs_shape_type = mlir::dyn_cast<ShapedType>(rhs);
      if (!rhs_shape_type) return lhs;
      auto lhs_shape_type = mlir::cast<ShapedType>(lhs);
      if (lhs_shape_type.hasRank() && rhs_shape_type.hasRank() &&
          lhs_shape_type.getRank() != rhs_shape_type.getRank()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc

          std::string asset_filename = asset.getFilename().str();
          std::string filename =
              tensorflow::io::JoinPath(saved_model_dir, asset_filename);
          ShapedType shaped_type =
              RankedTensorType::get({1}, TF::StringType::get(builder.getContext()));
          auto const_op = builder.create<TF::ConstOp>(
              asset.getLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 30 01:12:09 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc

      for (func::FuncOp func : module.getOps<func::FuncOp>()) {
        llvm::SmallVector<arith::ConstantOp, 4> constant_ops(
            func.getOps<arith::ConstantOp>());
        for (auto op : constant_ops) {
          ShapedType shaped_type =
              RankedTensorType::get({1}, StringType::get(context));
    
          DenseStringElementsAttr attr;
          if (!matchPattern(op.getOperation(), m_Constant(&attr))) {
            continue;
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 09:19:38 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/quantization_context.cc

        quant::AdjacentOperations *new_items, bool *changed) {
      // Use the final state to set all the operands' parameters.
      for (int i = 0, e = op->getNumOperands(); i != e; ++i) {
        auto ele = op->getOperand(i).getType().cast<ShapedType>().getElementType();
        if (ele.isa<FloatType>() && SetOperandParams(op, i, params)) {
          *changed |= true;
          new_items->push_back(op->getOperand(i).getDefiningOp());
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 08 01:38:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

      return true;
    }
    
    // Appends function arguments with `num_resources` number of arguments of
    // requested type.
    void AppendFunctionArguments(func::FuncOp func, int num_resources,
                                 ShapedType chaining_data_type) {
      for (int i = 0; i < num_resources; ++i) {
        func.getRegion().addArgument(chaining_data_type, func.getLoc());
      }
    
      FunctionType ftype =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc

          auto shape = llvm::to_vector<4>(inputType.getShape());
          llvm::SmallVector<int64_t, 4> bounds(shape.begin(), shape.end());
          // Mark the dim as dynamic dim.
          shape[0] = ShapedType::kDynamic;
          auto extensions =
              mhlo::TypeExtensionsAttr::get(func->getContext(), bounds);
          auto resultType =
              RankedTensorType::get(shape, inputType.getElementType(), extensions);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

        auto next_op = *transpose_op.getResult().getUsers().begin();
        if (dyn_cast_or_null<quantfork::QuantizeCastOp>(next_op)) return failure();
    
        auto input_type = mlir::cast<ShapedType>(transpose_op.getInput().getType());
        auto perm_type = mlir::cast<ShapedType>(transpose_op.getPerm().getType());
        if (input_type.hasStaticShape() && perm_type.hasStaticShape()) {
          if (perm_type.getNumElements() != input_type.getRank()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

      auto result_tuple_ty =
          mlir::dyn_cast_or_null<TupleType>(func.getFunctionType().getResult(0));
      if (!result_tuple_ty) return;
      if (result_tuple_ty.size() != 1) return;
      auto result_ty = mlir::dyn_cast<ShapedType>(result_tuple_ty.getType(0));
    
      func.eraseBody();
      func.addEntryBlock();
      ImplicitLocOpBuilder builder(func.getLoc(), func.getBody());
      llvm::SmallVector<int32_t> result_shape_i32;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

            auto original_result_type = user_op->getResult(0).getType();
            auto new_user_op_type = CloneTypeWithNewElementType(
                original_result_type,
                mlir::cast<ShapedType>(op_before_dequantize.getType())
                    .getElementType());
            createNewDequantizeOp(rewriter, op, user_op, user_idx,
                                  new_user_op_type);
          } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top