-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[mlir][xevm] Fix dialect descriptions formatting #147729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adam-smnk
wants to merge
1
commit into
llvm:main
Choose a base branch
from
adam-smnk:xevm-fix-docs-formatting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes markdown formatting of xevm dialect docs.
ping @silee2 |
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-mlir-llvm Author: Adam Siemieniuk (adam-smnk) ChangesFixes markdown formatting of xevm dialect docs. Full diff: https://github.com/llvm/llvm-project/pull/147729.diff 1 Files Affected:
diff --git a/mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td
index b5e81d595d74c..f457f47d56219 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/XeVMOps.td
@@ -201,25 +201,25 @@ def XeVM_BlockLoad2dOp
let description = [{
The `xevm.blockload2d` operation loads a two dimensional matrix tile
from a base matrix residing in global memory. The parameters are:
- $ptr - the base address of the base matrix containing the tile to load
- $base_width - the width of the base matrix in number of bytes.
- $base_height - the number of rows in the base matrix
- $base_pitch - the physical stride between the first columns of the current
- row and the subsequent row in number of bytes.
- $x, $y, $tile_width, $tile_height - the starting offsets and shape of
- the tile to load in number of elements.
- $elem_size_in_bits - the size in bits of the matrix element type
+ * `ptr` - the base address of the base matrix containing the tile to load
+ * `base_width` - the width of the base matrix in number of bytes.
+ * `base_height` - the number of rows in the base matrix
+ * `base_pitch` - the physical stride between the first columns of the current
+ row and the subsequent row in number of bytes.
+ * `x`, `y`, `tile_width`, `tile_height` - the starting offsets and shape of
+ the tile to load in number of elements.
+ * `elem_size_in_bits` - the size in bits of the matrix element type
- 32 for f32, tf32
- 16 for f16, int16, bf16
- 8 for int8
- $v_blocks - number of consecutive tiles in innermost dimension direction to load
- $transpose - transpose the tile in registers (useful for 32 bit element type)
- $pack_register - pack element types narrower than register bit width.
+ * `v_blocks` - number of consecutive tiles in innermost dimension direction to load
+ * `transpose` - transpose the tile in registers (useful for 32 bit element type)
+ * `pack_register` - pack element types narrower than register bit width.
[M, N] => [M/factor, N, factor] where factor is register_size_in_bits / elem_size_in_bits
- $cache_control - an enumerator that sets the cache behaviour
+ * `cache_control` - an enumerator that sets the cache behaviour
Notes:
- - the $transpose and $pack_register parameters are mutual exclusive
+ - the `transpose` and `pack_register` parameters are mutual exclusive
- transposing the tile loaded is used for A matrix in backward path or used for the B matrix operand
(D = C + A * B), where A has row-major layout and B should have column-major layout in memory.
- if the tile loaded contains out of bound elements of the matrix, they are filled with 0.
@@ -262,19 +262,19 @@ def XeVM_BlockStore2dOp
let description = [{
The `xevm.blockstore2d` operation stores a two dimensional tile into a
larger matrix residing in global memory. The parameters are:
- $ptr - the base address of the target matrix where to store the tile
- $base_width - the width of the base matrix in number of bytes.
- $base_height - the number of rows in the base matrix
- $base_pitch - the physical stride between the first columns of the current
- row and the subsequent row in number of bytes.
- $x, $y, $tile_width, $tile_height - the starting offsets and shape of the tile to store
+ * `ptr` - the base address of the target matrix where to store the tile
+ * `base_width` - the width of the base matrix in number of bytes.
+ * `base_height` - the number of rows in the base matrix
+ * `base_pitch` - the physical stride between the first columns of the current
+ row and the subsequent row in number of bytes.
+ * `x`, `y`, `tile_width`, `tile_height` - the starting offsets and shape of the tile to store
in number of elements.
- $elem_size_in_bits - the size in bits of the matrix element
+ * `elem_size_in_bits` - the size in bits of the matrix element
- 32 for f32, tf32
- 16 for f16, int16, bf16
- 8 for int8
- $cache_control - an enumerator that sets the cache behaviour
- $stored_val - the tile to store
+ * `cache_control` - an enumerator that sets the cache behaviour
+ * `stored_val` - the tile to store
Example:
```mlir
@@ -351,10 +351,10 @@ def XeVM_MemfenceOp
This operation ensures that all prior memory accesses of this
work-item to `addrspace` are visible to all other work-items in `scope`.
Parameters description:
- $scope - specify the memory scope at which all other work-items should observe
- memory operations prior to the fence.
- $addrspace - specify the address space of work-item's memory accesses
- to be affected by the fence.
+ * `scope` - specify the memory scope at which all other work-items should observe
+ memory operations prior to the fence.
+ * `addrspace` - specify the address space of work-item's memory accesses
+ to be affected by the fence.
}];
let assemblyFormat = [{prop-dict attr-dict}];
@@ -370,9 +370,9 @@ def XeVM_PrefetchOp
let summary = "Prefetch data into a cache subsystem.";
let description = [{
Work-item issues a prefetch from global memory to cache:
- $ptr - LLVM pointer with address space. Address space must be 1 (global)
- or 4 (generic)
- $cache_control - specify caching options
+ * `ptr` - LLVM pointer with address space. Address space must be 1 (global)
+ or 4 (generic)
+ * `cache_control` - specify caching options
}];
let assemblyFormat = [{
operands prop-dict attr-dict `:` `(` type(operands) `)`
@@ -395,19 +395,19 @@ def XeVM_BlockPrefetch2dOp
let description = [{
The `xevm.blockprefetch2d` operation prefetches a two dimensional tile
from a larger base matrix residing in global memory. The parameters are:
- $ptr - the base address of the base matrix containing the tile to prefetch
- $base_width - the width of the base matrix in number of bytes.
- $base_height - the number of rows in the base matrix
- $base_pitch - the physical stride between the first columns of the current
- row and the subsequent row in number of bytes.
- $x, $y, $tile_width, $tile_height - the starting offsets and shape of tile
- to prefetch in number of elements.
- $elem_size_in_bits - the size in bits of the matrix element
- - 32 for f32, bf32
- - 16 for f16, int16, bf16
- - 8 for int8, int4, int2
- $v_blocks - number of tiles in innermost dimension direction to prefetch
- $cache_control - an enumerator that sets the cache behaviour
+ * `ptr` - the base address of the base matrix containing the tile to prefetch
+ * `base_width` - the width of the base matrix in number of bytes.
+ * `base_height` - the number of rows in the base matrix
+ * `base_pitch` - the physical stride between the first columns of the current
+ row and the subsequent row in number of bytes.
+ * `x`, `y`, `tile_width`, `tile_height` - the starting offsets and shape of tile
+ to prefetch in number of elements.
+ * `elem_size_in_bits` - the size in bits of the matrix element
+ - 32 for f32, bf32
+ - 16 for f16, int16, bf16
+ - 8 for int8, int4, int2
+ * `v_blocks` - number of tiles in innermost dimension direction to prefetch
+ * `cache_control` - an enumerator that sets the cache behaviour
Example:
```mlir
@@ -452,9 +452,9 @@ def XeVM_ElemTypeAttr : I32EnumAttr<"ElemType", "XeVM element type",
def XeVM_MMAShapeAttr : XeVM_Attr<"MMAShape", "mma_shape"> {
let description = [{
MMA operation is represented as D=AxB+C, where
- A has the shape MxK.
- B has the shape KxN.
- D and C have the shape MxN.
+ - A has the shape MxK.
+ - B has the shape KxN.
+ - D and C have the shape MxN.
This attribute encodes the shape of all matrices that participate in MMA.
}];
let parameters = (ins "int":$m, "int":$n, "int":$k);
@@ -484,17 +484,17 @@ def XeVM_MMAOp
D = C + A x B
where the A, B, C input matrices and the result D have shapes:
- D : MxN
- C : MxN
- A : MxK
- B : KxN
+ - D : MxN
+ - C : MxN
+ - A : MxK
+ - B : KxN
Parameters:
- `a` - vector of matrix A elements.
- `b` - vector of matrix B elements.
- `c` - (optional) vector of matrix C elements.
- `shape` - the shape of the matrices, specified as `M`, `N`, and `K` values.
- `types` - the data types of the matrices, specified as `D`, `A`, `B`, and optionally `C`.
+ * `a` - vector of matrix A elements.
+ * `b` - vector of matrix B elements.
+ * `c` - (optional) vector of matrix C elements.
+ * `shape` - the shape of the matrices, specified as `M`, `N`, and `K` values.
+ * `types` - the data types of the matrices, specified as `D`, `A`, `B`, and optionally `C`.
Example:
```mlir
|
rengolin
approved these changes
Jul 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes markdown formatting of xevm dialect docs.