Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 58 for ShapedType (0.28 sec)

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

      };
    
      bool need_to_set_input_nodes_quantization_params = false;
      for (const BlockArgument arg : func.getArguments()) {
        auto shaped = mlir::dyn_cast<ShapedType>(arg.getType());
        if (shaped && mlir::isa<FloatType>(shaped.getElementType()) &&
            !has_quantize_op(arg)) {
          need_to_set_input_nodes_quantization_params = true;
          break;
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

        if (bias_op != nullptr) {
          Type bias_type = bias_op->getResult(0).getType();
          if (bias_type != builder_.getNoneType()) {
            const int bias_rank = mlir::dyn_cast<ShapedType>(bias_type).getRank();
            adjusted_quant_dim = bias_rank > 1 ? bias_rank - 1 : 0;
          }
        }
      }
    
      for (const int non_bias_operand_index : non_bias_operand_indices) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      auto input_type = mlir::dyn_cast_or_null<ShapedType>(input.getType());
      if (!input_type) return failure();
    
      // Only need to do this for quantized input.
      auto input_quantized_type =
          quant::QuantizedType::getQuantizedElementType(input_type);
      if (!input_quantized_type) return failure();
    
      auto output = mean_op.getOutput();
      auto output_type = mlir::dyn_cast_or_null<ShapedType>(output.getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

      };
    
      bool need_to_set_input_nodes_quantization_params = false;
      for (const BlockArgument arg : func.getArguments()) {
        auto shaped = mlir::dyn_cast<ShapedType>(arg.getType());
        if (shaped && mlir::isa<FloatType>(shaped.getElementType()) &&
            !has_quantize_op(arg)) {
          need_to_set_input_nodes_quantization_params = true;
          break;
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

      // known.
      mlir::Type output_type;
      auto input_type = mlir::cast<mlir::TensorType>(src_input.getType());
    
      if (input_type.hasRank()) {
        if (input_type.getShape()[split_dimension] == mlir::ShapedType::kDynamic) {
          output_type = input_type;
        } else {
          auto shape = llvm::to_vector<4>(input_type.getShape());
          if (shape[split_dimension] % num_split != 0) {
            return mlir::emitError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

      if (!encoding) return false;
    
      for (int i = 0; i < ranked_ty.getRank(); ++i) {
        if (ranked_ty.isDynamicDim(i) &&
            encoding.getBounds()[i] == ShapedType::kDynamic) {
          return false;
        }
      }
      return true;
    }
    
    bool HasSymbolRefAttr(Operation* op) {
      for (const auto& attr : op->getAttrs()) {
        Attribute attr_value = attr.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

          AttrValue attr_val;
          // For type attributes, we only propagate the element type.
          mlir::Type elt_type = attr.getValue();
          if (auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(elt_type)) {
            elt_type = shaped_type.getElementType();
          }
          TF_RETURN_IF_ERROR(
              ConvertAttribute(elt_type, remove_ref_type, &attr_val));
          list->add_type(attr_val.type());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

        // Connect `expand_op` with the input of `stb_op`.
        expand_op.setOperand(0, stb_op.getInput());
        // Calculate the shape for expand.
        auto input_shape =
            mlir::cast<ShapedType>(stb_op.getInput().getType()).getShape();
        SmallVector<int64_t, 4> expand_shape(input_shape.begin(),
                                             input_shape.end());
        expand_shape.insert(expand_shape.begin() + expand_axis, 1);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
Back to top