[Mlir-commits] [mlir] [MLIR] [AMX] Utilize x86_amx type for AMX dialect in MLIR. (PR #111197)

Renato Golin llvmlistbot at llvm.org
Mon Oct 28 02:49:31 PDT 2024


================
@@ -258,6 +259,9 @@ class LLVMTypeConverter : public TypeConverter {
   /// Convert a 1D vector type into an LLVM vector type.
   FailureOr<Type> convertVectorType(VectorType type) const;
 
+  /// Convert AMX tile type x86_amx type.
+  Type convertAMXTileType(amx::TileType type) const;
----------------
rengolin wrote:

> I cannot declare an external LLVM compatible type.

I'm not sure what you mean by this. Should be possible to create a new type in the LLVM dialect that lowers directly to the LLVM IR type.

> The only simple way to get rid of the new dependency here is to move `amx::TileType` to bulitin types.

That's not the right way around, indeed.

> Probably, the best solution would be to introduce a type interface for converting custom types to LLVMIR dialect types.

Is this the only case of custom type conversion into LLVM? Are there no other examples in tree?

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


More information about the Mlir-commits mailing list