Skip to content

Commit 478c71b

Browse files
committed
[mlir][amx] add doc to AMX dialect
Making sure the AMX dialect webpage reads better with a short introduction on the purpose of this dialect. Reviewed By: grosul1, bondhugula Differential Revision: https://reviews.llvm.org/D107419
1 parent f3eb5f9 commit 478c71b

File tree

1 file changed

+19
-2
lines changed
  • mlir/include/mlir/Dialect/AMX

1 file changed

+19
-2
lines changed

mlir/include/mlir/Dialect/AMX/AMX.td

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
// This file defines the basic operations for the AMX dialect.
1010
//
11-
// The Intel Advanced Matrix Extensions (AMX) provides a tile matrix
11+
// The Intel Advanced Matrix Extensions (AMX) provide a tile matrix
1212
// multiply unit (TMUL), a tile control register (TILECFG), and eight
1313
// tile registers TMM0 through TMM7 (TILEDATA).
1414
//
@@ -38,6 +38,23 @@ include "mlir/Interfaces/SideEffectInterfaces.td"
3838
def AMX_Dialect : Dialect {
3939
let name = "amx";
4040
let cppNamespace = "::mlir::amx";
41+
let description = [{
42+
The Intel Advanced Matrix Extensions (AMX) provide a tile matrix
43+
multiply unit (TMUL), a tile control register (TILECFG), and eight
44+
tile registers TMM0 through TMM7 (TILEDATA).
45+
46+
This `AMX` dialect provides a bridge between MLIR concepts such as
47+
vectors and memrefs and the lower level LLVM IR support of AMX.
48+
The dialect is split into user-facing AMX ops (AMX_Op) and
49+
backend-facing intrinsic ops (AMX_IntrOp).
50+
51+
Note that since configuration changes (implicit at dialect level) are
52+
costly, it is highly recommended to use the AMX dialect on same-shaped
53+
vectors, at least within a single method.
54+
55+
For details, see the Intel documentation:
56+
https://software.intel.com/content/www/us/en/develop/articles/intel-sdm.html
57+
}];
4158
}
4259

4360
//===----------------------------------------------------------------------===//
@@ -203,7 +220,7 @@ def TileMulIOp : AMX_Op<"tile_muli", [NoSideEffect, AllTypesMatch<["acc", "res"]
203220
Example:
204221

205222
```mlir
206-
%0 = amx.tile_muli %a zext, %b zext, %c
223+
%0 = amx.tile_muli %a zext, %b zext, %c
207224
: vector<16x64xi8>, vector<16x64xi8>, vector<16x16xi32>
208225
```
209226
}];

0 commit comments

Comments
 (0)