Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 156 for RankedTensorType (0.28 sec)

  1. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        ComputePermutation(input_tensor, perm, output_shape, num_dimensions,
                           /*output_axis=*/0, &input_indices, &new_values);
        auto result_type =
            RankedTensorType::get(output_shape, output_type.getElementType());
        auto values_type = RankedTensorType::get(
            output_shape,
            mlir::cast<quant::UniformQuantizedType>(output_type.getElementType())
                .getStorageType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/set_tpu_infeed_layout.cc

    #include "xla/stream_executor/tpu/tpu_api.h"
    #include "xla/translate/mhlo_to_hlo/type_to_shape.h"
    
    namespace mlir {
    
    static FailureOr<std::vector<int64_t>> GetTPUInfeedLayoutFromAPI(
        RankedTensorType t) {
      // Call the TPU API to determine the right infeed layout. Note that
      // this can fail if we're not running on a TPU-enabled node.
      // TODO(kramm): Move this into a separate pass. See b/184944903
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

            filter_quantized_element_type.getZeroPoint());
      }
    
      SmallVector<int64_t, 1> bias_shape = {filter_shape[0]};
      auto bias_type =
          RankedTensorType::getChecked(loc, bias_shape, bias_quantized_type);
    
      auto bias_value_type = RankedTensorType::getChecked(
          loc, std::move(bias_shape), rewriter.getI32Type());
      auto bias_value = DenseIntElementsAttr::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

        def addOperands(self, arg0: list[Value]) -> None: ...
        def addRegion(self) -> Region: ...
        def addTypes(self, arg0: list[Type]) -> None: ...
    
    class RankedTensorType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def get(self, arg0: Type) -> RankedTensorType: ...
    
    class Region:
        def __init__(self, *args, **kwargs) -> None: ...
        def add_block(self) -> None: ...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.td

    include "mlir/IR/OpBase.td"
    include "mlir/Dialect/Arith/IR/ArithOps.td"
    
    def ConstDenseElementsI32ZeroAttr
      : NativeCodeCall<"$_builder.create<TFL::ConstOp>($_loc, DenseElementsAttr::get(RankedTensorType::get({}, $_builder.getI32Type()), {0}))">;
    
    def Size1InputRange : NativeCodeCall<
      "SmallVector<Value, 1>{$0}">;
    
    def Size2InputRange : NativeCodeCall<
      "SmallVector<Value, 2>{$0, $1}">;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 18 07:12:51 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

        // output type doesn't have to be static but if input types and indices are
        // constant, then the output type can be statically determined.
        RankedTensorType out_ty = mlir::dyn_cast<RankedTensorType>(op.getType());
        if (!out_ty || !out_ty.hasStaticShape()) return failure();
    
        // Extract out all the constant indices' attributes and verify that data
        // types are static.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/utils.h

      OpBuilder::InsertionGuard guard(*builder);
      Block* block = builder->createBlock(body);
    
      // Block arguments are scalars of the given element type.
      Type type = RankedTensorType::get(/*shape=*/{}, element_type);
      Location loc = body->getLoc();
      block->addArguments({type, type}, SmallVector<Location, 2>(2, loc));
    
      auto reducer =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc

    TF::ConstOp Create1DStringConst(const ArrayRef<std::string> str_values,
                                    const Location loc, OpBuilder& builder) {
      const auto tensor_type =
          RankedTensorType::get(/*shape=*/{static_cast<int64_t>(str_values.size())},
                                /*elementType=*/builder.getType<TF::StringType>());
    
      return builder.create<TF::ConstOp>(
          loc, DenseStringElementsAttr::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 12 06:02:20 UTC 2023
    - 9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

      }
      // Update the bias type for both static and dynamic broadcasts.
      if (succeeded(bcast_op)) {
        Value bcast_op_result = (*bcast_op)->getResult(0);
        auto bcast_op_result_type =
            mlir::cast<RankedTensorType>(bcast_op_result.getType());
        const ArrayRef<int64_t> bcast_shape = bcast_op_result_type.getShape();
        const TensorType new_bcast_op_result_type = bcast_op_result_type.cloneWith(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

        return rewriter.notifyMatchFailure(op, "failed to extract dilation rate");
      }
    
      if (expand_op) {
        if (mlir::dyn_cast<RankedTensorType>(stb_op.getInput().getType()) ==
            nullptr) {
          return rewriter.notifyMatchFailure(
              stb_op, "SpaceToBatchND op's input should have RankedTensorType");
        }
      }
    
      // TODO(b/149936532): Check that the input width & height are multiples of
      // dilation rate.
    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