Skip to content

Commit 32133cf

Browse files
committed
add optimization note
1 parent 037193b commit 32133cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎reduction_tiling_docs/fused_attention_tiling.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Input sizes:
77
- K: 4096x64
88
- V: 4096x64
99

10-
```
10+
```mlir
1111
func.func @attention(%Q : memref<4096x64xf32>, %K: memref<4096x64xf32>,
1212
%V: memref<4096x64xf32>, %out: memref<4096x64xf32>) {
1313
...
@@ -56,7 +56,7 @@ func.func @attention(%Q : memref<4096x64xf32>, %K: memref<4096x64xf32>,
5656

5757
After tiling the final matmul `%o = linalg.matmul ins(%p, %v)` along the K dimension with tile size 16:
5858

59-
```
59+
```mlir
6060
func.func @attention(%Q : memref<4096x64xf32>, %K: memref<4096x64xf32>,
6161
%V: memref<4096x64xf32>, %out: memref<4096x64xf32>) {
6262
...
@@ -97,7 +97,7 @@ func.func @attention(%Q : memref<4096x64xf32>, %K: memref<4096x64xf32>,
9797

9898
After tiling the softmax computation in the reduction dimension with tile size 16 and fusing operations, following the pattern from the softmax lowering flow:
9999

100-
```
100+
```mlir
101101
func.func @attention(%Q : memref<4096x64xf32>, %K: memref<4096x64xf32>,
102102
%V: memref<4096x64xf32>, %out: memref<4096x64xf32>) {
103103
...

0 commit comments

Comments
 (0)