[Mlir-commits] [mlir] [mlir][SPIRV] Add decorateType method for MatrixType (PR #112018)

Jakub Kuderski llvmlistbot at llvm.org
Fri Oct 11 09:49:32 PDT 2024


================
@@ -138,6 +140,25 @@ Type VulkanLayoutUtils::decorateType(spirv::ArrayType arrayType,
   return spirv::ArrayType::get(memberType, numElements, elementSize);
 }
 
+Type VulkanLayoutUtils::decorateType(spirv::MatrixType matrixType,
+                                     VulkanLayoutUtils::Size &size,
+                                     VulkanLayoutUtils::Size &alignment) {
+  const auto numColumns = matrixType.getNumColumns();
+  const auto columnType = matrixType.getColumnType();
+  const auto numElements = matrixType.getNumElements();
+  auto elementType = matrixType.getElementType();
----------------
kuhar wrote:

Do not use auto when the type is not obvious based on the RHS only

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


More information about the Mlir-commits mailing list