Skip to content

Commit b691054

Browse files
committed
Add a parsing/printing test
1 parent 9b814e2 commit b691054

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

mlir/test/Dialect/GPU/ops.mlir

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,20 @@ module attributes {gpu.container_module} {
430430
gpu.wait [%token16]
431431
return
432432
}
433+
434+
// CHECK-LABEL: func @extract_insert_mma
435+
func.func @extract_insert_mma(%src : !gpu.mma_matrix<16x16xf32, "COp">,
436+
%ptr: memref<16x16xf32>) {
437+
%zero = arith.constant 0.0 : f32
438+
%c0 = arith.constant 0 : index
439+
// CHECK: gpu.subgroup_mma_extract
440+
%val = gpu.subgroup_mma_extract %src[%c0] : !gpu.mma_matrix<16x16xf32, "COp"> -> f32
441+
%m = gpu.subgroup_mma_constant_matrix %zero : !gpu.mma_matrix<16x16xf32, "COp">
442+
// CHECK: gpu.subgroup_mma_insert
443+
%s0 = gpu.subgroup_mma_insert %val, %m[%c0] : f32, !gpu.mma_matrix<16x16xf32, "COp"> -> !gpu.mma_matrix<16x16xf32, "COp">
444+
gpu.subgroup_mma_store_matrix %s0, %ptr[%c0, %c0] {leadDimension = 16 : index} : !gpu.mma_matrix<16x16xf32, "COp">, memref<16x16xf32>
445+
return
446+
}
433447
}
434448

435449
// Just check that this doesn't crash.

0 commit comments

Comments
 (0)