Skip to content

Commit 50d19a6

Browse files
committed
Adding a test file
1 parent 2009ede commit 50d19a6

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: mlir-opt %s -convert-amdgpu-to-rocdl=chipset=gfx950 | FileCheck %s
2+
3+
#gpu_lds_addrspace = 3
4+
#amdgpu_fat_buffer_addrspace = 7
5+
6+
// CHECK-LABEL: func @transpose_load_to_rocdl_4xf16
7+
func.func @transpose_load_to_rocdl_4xf16(%idx1 : index, %idx2 : index, %wgmem : memref<128x72xf16, #gpu_lds_addrspace>) -> vector<4xf16> {
8+
// CHECK: rocdl.ds.read.tr16.b64
9+
%0 = amdgpu.transpose_load %wgmem[%idx1, %idx2] : memref<128x72xf16, #gpu_lds_addrspace> -> vector<4xf16>
10+
return %0 : vector<4xf16>
11+
}
12+
13+
// CHECK-LABEL: func @transpose_load_to_rocdl_8xi8
14+
func.func @transpose_load_to_rocdl_8xi8(%idx1 : index, %idx2 : index, %wgmem : memref<128x128xi8, #gpu_lds_addrspace>) -> vector<8xi8> {
15+
// CHECK: rocdl.ds.read.tr8.b64
16+
%0 = amdgpu.transpose_load %wgmem[%idx1, %idx2] : memref<128x128xi8, #gpu_lds_addrspace> -> vector<8xi8>
17+
return %0 : vector<8xi8>
18+
}

0 commit comments

Comments
 (0)