Skip to content

Commit b7129d8

Browse files
Add a lit test for the gpu pipeline (#420)
1 parent 34fe67e commit b7129d8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: gc-opt %s --gc-gpu-pipeline -split-input-file | FileCheck %s
2+
3+
// Regression check for infinite loop in the linalg-to-xegpu pass
4+
// CHECK-DAG: @gcGpuOclKernel_corner_shape_matmul_f16_kernel_SPIRV
5+
// CHECK-DAG: @createGcGpuOclKernel_corner_shape_matmul_f16_kernel
6+
// CHECK-DAG: @corner_shape_matmul_f16
7+
module @fragment_name attributes {} {
8+
func.func @corner_shape_matmul_f16(%arg0: memref<521x521xf16>, %arg1: memref<521x521xf16>, %arg2: memref<521x521xf16>) {
9+
%0 = bufferization.to_tensor %arg0 restrict : memref<521x521xf16>
10+
%1 = bufferization.to_tensor %arg1 restrict : memref<521x521xf16>
11+
%2 = tensor.empty() : tensor<521x521xf16>
12+
%cst = arith.constant 0.000000e+00 : f16
13+
%3 = linalg.fill ins(%cst : f16) outs(%2 : tensor<521x521xf16>) -> tensor<521x521xf16>
14+
%4 = linalg.matmul_transpose_b ins(%0, %1 : tensor<521x521xf16>, tensor<521x521xf16>) outs(%3 : tensor<521x521xf16>) -> tensor<521x521xf16>
15+
bufferization.materialize_in_destination %4 in restrict writable %arg2 : (tensor<521x521xf16>, memref<521x521xf16>) -> ()
16+
return
17+
}
18+
}

0 commit comments

Comments
 (0)