[Mlir-commits] [mlir] [mlir][docs] Fix typos in documentation for MLIR tensor dialect (PR #119095)
Giordano Salvador
llvmlistbot at llvm.org
Sat Dec 7 13:39:09 PST 2024
https://github.com/e3m3 updated https://github.com/llvm/llvm-project/pull/119095
>From ae03534a539a95d7f5ed4d000e7b06a6521c6b2f Mon Sep 17 00:00:00 2001
From: Giordano Salvador <73959795+e3m3 at users.noreply.github.com>
Date: Sat, 7 Dec 2024 15:44:32 -0500
Subject: [PATCH 1/2] [mlir][docs] Fix tensor.dim documentation referencing
memref type
---
mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
index b73da8bb6af59c..982048e6a2fa23 100644
--- a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
+++ b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
@@ -213,11 +213,11 @@ def Tensor_DimOp : Tensor_Op<"dim", [
// Return the dynamic dimension of %A.
%c1 = arith.constant 1 : index
- %y = tensor.dim %A, %c1 : memref<4x?xf32>
+ %y = tensor.dim %A, %c1 : tensor<4x?xf32>
// Equivalent generic form:
- %x = "tensor.dim"(%A, %c0) : (memref<4x?xf32>, index) -> index
- %y = "tensor.dim"(%A, %c1) : (memref<4x?xf32>, index) -> index
+ %x = "tensor.dim"(%A, %c0) : (tensor<4x?xf32>, index) -> index
+ %y = "tensor.dim"(%A, %c1) : (tensor<4x?xf32>, index) -> index
```
}];
>From b20f2997a01d4e28c37c966a15142491a17de85f Mon Sep 17 00:00:00 2001
From: Giordano Salvador <73959795+e3m3 at users.noreply.github.com>
Date: Sat, 7 Dec 2024 15:55:07 -0500
Subject: [PATCH 2/2] [mlir][docs] Fix tensor dialect documentation typos for
ops
---
mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
index 982048e6a2fa23..812ac209845020 100644
--- a/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
+++ b/mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
@@ -673,7 +673,7 @@ def Tensor_GatherOp : Tensor_Op<"gather", [
At the tensor-level, the index tensor is specified in an AoS form (i.e.
coordinate tuple is the most minor). It is the responsibility of further
- lowerings and bufferiation to implement various concrete layouts.
+ lowerings and bufferization to implement various concrete layouts.
Note: As currently specified, the operation must lower to an abstraction that
performs copies to the output tensor. This is because the buffer type system
@@ -710,7 +710,7 @@ def Tensor_GatherOp : Tensor_Op<"gather", [
let extraClassDeclaration = [{
// TODO: InferTypeOpInterface once enough confidence is built with
- // tensor<tensor> and its lwoering to memref<memref>.
+ // tensor<tensor> and its lowering to memref<memref>.
static RankedTensorType inferResultType(RankedTensorType sourceType,
RankedTensorType indicesType,
ArrayRef<int64_t> gatherDims,
@@ -1673,7 +1673,7 @@ def Tensor_ScatterOp : Tensor_Op<"scatter", [
source tensor has size `1`.
I.e. if the dest type is `axbxcxd` and the coordinates are [1, 3], then
the source type suffix is `ax1xcx1`.
- Sactter also allows rank-reducing semantics where the shape `ax1xcx1` can be
+ Scatter also allows rank-reducing semantics where the shape `ax1xcx1` can be
further simplified to `axc`.
The elemental type of the indices tensor can be any integer type.
@@ -1693,7 +1693,7 @@ def Tensor_ScatterOp : Tensor_Op<"scatter", [
At the tensor-level, the index tensor is specified in an AoS form (i.e.
coordinate tuple is the most minor). It is the responsibility of further
- lowerings and bufferiation to implement various concrete layouts.
+ lowerings and bufferization to implement various concrete layouts.
Note: As currently specified, the operation must lower to an abstraction that
performs copies to the output tensor. This is because the buffer type system
@@ -2115,7 +2115,7 @@ def Tensor_UnPackOp : Tensor_RelayoutOp<"unpack"> {
/// Check if this UnPackOp is like a simple unpad operation.
/// In other words, this operation:
/// 1. drops useless dimensions (dimension of size 1), and
- /// 2. reduces dimensions in place (i.e., no tranpose.)
+ /// 2. reduces dimensions in place (i.e., no transpose.)
bool isLikeUnPad();
}];
More information about the Mlir-commits
mailing list