[Mlir-commits] [mlir] [mlir] Add optional layout attribute to VectorType (PR #71916)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Nov 10 12:11:00 PST 2023


================
@@ -1050,6 +1052,14 @@ def Builtin_Vector : Builtin_Type<"Vector", [ShapedTypeInterface], "Type"> {
     declarations, `vector<0x42xi32>` is invalid because it is interpreted as a
     2D vector with shape `(0, 42)` and zero shapes are not allowed.
 
+    ##### Layout
+
+    A vector may optionally have a layout that indicates how indices of
+    the vector are transformed to indices of the vector fragments that
+    are held by individual threads in a SIMT execution model. Such layouts
+    are common in a wide variety of GPU matrix multiplication instructions.
+    The layout can be any attribute that implements `VectorLayoutAttrInterface`.
----------------
harsh-nod wrote:

Sure, will rewrite this to make it more general. I think the primary motivation for this was GPU/SIMT but people can use this in different ways.

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


More information about the Mlir-commits mailing list