[all-commits] [llvm/llvm-project] cc2d5f: [mlir][spirv] Make `CooperativeMatrixType` a `Shap...

Igor Wodiany via All-commits all-commits at lists.llvm.org
Mon Jun 9 08:02:10 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc2d5facecfe5fe31d69fd58f4f3c0bc97591229
      https://github.com/llvm/llvm-project/commit/cc2d5facecfe5fe31d69fd58f4f3c0bc97591229
  Author: Igor Wodiany <igor.wodiany at imgtec.com>
  Date:   2025-06-09 (Mon, 09 Jun 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVArithmeticOps.td
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
    M mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp
    M mlir/test/Dialect/SPIRV/IR/khr-cooperative-matrix-ops.mlir

  Log Message:
  -----------
  [mlir][spirv] Make `CooperativeMatrixType` a `ShapedType` (#142784)

This is to enable `CooperativeMatrixType` to be used with
`DenseElementsAttr`, so that a `spirv.Constant` can be easily built from
`OpConstantComposite`. For example:

```mlir
%cst = spirv.Constant dense<0.000000e+00> : !spirv.coopmatrix<1x1xf32, Subgroup, MatrixAcc>
```

Constraints of arithmetic operations are changed, as
`SameOperandsAndResultType` can no longer fully verify CoopMatrices.
This is because for shaped types the verifier only checks element type
and shapes, whereas for any other arbitrary type it looks for an exact
match.

This patch does not enable the actual deserialization. This will be
done in a subsequent PR.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list