[Mlir-commits] [mlir] [mlir][SPIRV] Add decorateType method for MatrixType (PR #112018)
MingZhu Yan
llvmlistbot at llvm.org
Fri Oct 11 17:21:29 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();
----------------
trdthg wrote:
`getElementType()` will return `Type`
you mean `Type elementType = matrixType.getElementType();` would be better?
I think it's not bad, but the code in other similar places also uses `auto`. Should I replace them all?
https://github.com/llvm/llvm-project/pull/112018
More information about the Mlir-commits
mailing list