[clang] [lldb] [llvm] [OpenCL][Clang] Add support for cooperative matrix extension (PR #221328)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 13:55:40 PDT 2026
================
@@ -4582,6 +4583,123 @@ class ConstantMatrixType final : public MatrixType {
}
};
+/// Represents an opaque OpenCL cooperative matrix type.
+///
+/// Unlike MatrixType, a cooperative matrix is not an ordinary matrix value.
+/// It is an opaque, distributed object whose shape and role are part of its
+/// type identity.
+class CooperativeMatrixType final : public Type, public llvm::FoldingSetNode {
----------------
asudarsa-qti wrote:
@svenvh comment: Is inheriting from MatrixType the right (and safe) thing to do? Cooperative matrices are opaque distributed objects, unlike ordinary matrices, so CooperativeMatrixType might be inheriting MatrixType functionality that isn't really appropriate for cooperative matrix types.
Reply: I have completely revamped the implementation to stop inheriting from MatrixType. Thanks again for this feedback.
Attn: @MrSidims
https://github.com/llvm/llvm-project/pull/221328
More information about the cfe-commits
mailing list