[Mlir-commits] [mlir] [mlir][spirv] Rework type capability queries (PR #160113)

Igor Wodiany llvmlistbot at llvm.org
Mon Sep 22 07:41:59 PDT 2025


================
@@ -1271,16 +1259,11 @@ unsigned MatrixType::getNumElements() const {
   return (getImpl()->columnCount) * getNumRows();
 }
 
-void MatrixType::getCapabilities(
-    SPIRVType::CapabilityArrayRefVector &capabilities,
-    std::optional<StorageClass> storage) {
-  {
-    static const Capability caps[] = {Capability::Matrix};
-    ArrayRef<Capability> ref(caps, std::size(caps));
-    capabilities.push_back(ref);
-  }
-  // Add any capabilities associated with the underlying vectors (i.e., columns)
-  llvm::cast<SPIRVType>(getColumnType()).getCapabilities(capabilities, storage);
+void TypeCapabilityVisitor::addConcrete(MatrixType type) {
+  add(type.getColumnType());
+
----------------
IgWod-IMG wrote:

nit: Again this and Runtime Array have a new line, but Coop Matrix and Arm Tensor do not.

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


More information about the Mlir-commits mailing list