[Mlir-commits] [mlir] [mlir][x86] Move AMX dialect into X86 dialect (PR #183717)

Adam Siemieniuk llvmlistbot at llvm.org
Fri Feb 27 02:26:15 PST 2026


================
@@ -29,6 +29,19 @@
 
 #include "mlir/Dialect/X86/X86Dialect.h.inc"
 
+#define GET_TYPEDEF_CLASSES
+#include "mlir/Dialect/X86/X86Types.h.inc"
+
+namespace mlir {
+namespace x86 {
+namespace amx {
+// Alias to allow access to AMX type through nested namespaces
+// analogously to AMX operations.
+using TileType = mlir::x86::AMXTileType;
----------------
adam-smnk wrote:

I haven't found a way to do this in tablegen for types while ops can override namespace through `let cppNamespace =` (like for `class AMX_Op`).

General idea is to have namespace hierarchy mirror IR mnemonics e.g.. `x86.amx.tile_load` as `x86::amx::TileLoadOp`. I plan to refactor other existing X86 ops to follow this scheme in the future.
For consistency and ease of use, I'd prefer to have types be accessible in the same way.

Open to suggestions.

https://github.com/llvm/llvm-project/pull/183717


More information about the Mlir-commits mailing list