Skip to content

Commit 41edb09

Browse files
committed
[mlir][SPIRV] Do not rewrite CompositeInsert for coopmatrix
When rewriting multiple CompositeInserts to CompositeConstruct, we need to know the number of elements of the result type. However, we cannot query the number of elements for cooperative matrix types.
1 parent 316a6ff commit 41edb09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ void RewriteInsertsPass::runOnOperation() {
8484
LogicalResult RewriteInsertsPass::collectInsertionChain(
8585
spirv::CompositeInsertOp op,
8686
SmallVectorImpl<spirv::CompositeInsertOp> &insertions) {
87+
if (llvm::isa<spirv::CooperativeMatrixType>(op.getComposite().getType()))
88+
return failure();
89+
8790
auto indicesArrayAttr = cast<ArrayAttr>(op.getIndices());
8891
// TODO: handle nested composite object.
8992
if (indicesArrayAttr.size() == 1) {

0 commit comments

Comments
 (0)