Skip to content

Commit ebb0061

Browse files
authored
add abi version to rocdl target (#139)
1 parent 54a5ffe commit ebb0061

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_gpu.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -760,15 +760,15 @@ def mat_product_kernel(
760760
hip_check(hip.hipGetDeviceProperties(props, 0))
761761
arch = props.gcnArchName.decode()
762762

763-
@module("naive", [f'#rocdl.target<chip = "{arch}">'])
763+
@module("naive", [f'#rocdl.target<chip = "{arch}", abi = "500">'])
764764
def gpu_module():
765765
mat_product_kernel.emit()
766766

767767
lowered_module = run_pipeline(
768768
gpu_module,
769769
Pipeline()
770770
.Gpu(Pipeline().convert_gpu_to_rocdl(use_bare_ptr_memref_call_conv=True))
771-
.rocdl_attach_target(chip=arch)
771+
.rocdl_attach_target(chip=arch, abi="500")
772772
.gpu_to_llvm()
773773
.lower_to_llvm()
774774
.gpu_module_to_binary(),
@@ -871,15 +871,15 @@ def mat_product_kernel(
871871
hip_check(hip.hipGetDeviceProperties(props, 0))
872872
arch = props.gcnArchName.decode()
873873

874-
@module("naive", [f'#rocdl.target<chip = "{arch}">'])
874+
@module("naive", [f'#rocdl.target<chip = "{arch}", abi = "500">'])
875875
def gpu_module():
876876
mat_product_kernel.emit()
877877

878878
lowered_module = run_pipeline(
879879
gpu_module,
880880
Pipeline()
881881
.Gpu(Pipeline().convert_gpu_to_rocdl(use_bare_ptr_memref_call_conv=True))
882-
.rocdl_attach_target(chip=arch)
882+
.rocdl_attach_target(chip=arch, abi="500")
883883
.gpu_to_llvm()
884884
.lower_to_llvm()
885885
.gpu_module_to_binary(),
@@ -998,15 +998,15 @@ def smol_matmul(
998998
hip_check(hip.hipGetDeviceProperties(props, 0))
999999
arch = props.gcnArchName.decode()
10001000

1001-
@module("naive", [f'#rocdl.target<chip = "{arch}">'])
1001+
@module("naive", [f'#rocdl.target<chip = "{arch}", abi = "500">'])
10021002
def gpu_module():
10031003
smol_matmul.emit()
10041004

10051005
lowered_module = run_pipeline(
10061006
gpu_module,
10071007
Pipeline()
10081008
.Gpu(Pipeline().convert_gpu_to_rocdl(use_bare_ptr_memref_call_conv=True))
1009-
.rocdl_attach_target(chip=arch)
1009+
.rocdl_attach_target(chip=arch, abi="500")
10101010
.gpu_to_llvm()
10111011
.lower_to_llvm()
10121012
.gpu_module_to_binary(),
@@ -1106,7 +1106,7 @@ def all_bank_conflicts(A: T.memref(M, M, T.f32()), B: T.memref(M, M, T.f32())):
11061106
hip_check(hip.hipGetDeviceProperties(props, 0))
11071107
arch = props.gcnArchName.decode()
11081108

1109-
@module("naive", [f'#rocdl.target<chip = "{arch}">'])
1109+
@module("naive", [f'#rocdl.target<chip = "{arch}", abi = "500">'])
11101110
def gpu_module():
11111111
no_bank_conflicts.emit()
11121112
all_bank_conflicts.emit()
@@ -1115,7 +1115,7 @@ def gpu_module():
11151115
gpu_module,
11161116
Pipeline()
11171117
.Gpu(Pipeline().convert_gpu_to_rocdl(use_bare_ptr_memref_call_conv=True))
1118-
.rocdl_attach_target(chip=arch)
1118+
.rocdl_attach_target(chip=arch, abi="500")
11191119
.gpu_to_llvm()
11201120
.lower_to_llvm()
11211121
.gpu_module_to_binary(),

0 commit comments

Comments
 (0)