[Mlir-commits] [mlir] [MLIR][ROCDL] Added `SchedGroupBarrier` and `IglpOpt` ops (PR #112237)
Giuseppe Rossini
llvmlistbot at llvm.org
Tue Oct 15 10:59:12 PDT 2024
================
@@ -387,3 +388,26 @@ gpu.module @module_1 [#rocdl.target<O = 1, chip = "gfx900", abi = "500", link =
gpu.module @module_2 [#rocdl.target<chip = "gfx900">, #rocdl.target<chip = "gfx90a">] {
}
+
+// -----
+
+// ROCDL2LLVM: @rocdl_sched_barrier
+func.func @rocdl_sched_barrier() {
+ // ROCDL2LLVM-NEXT: call void @llvm.amdgcn.sched.barrier(i32 0)
+ rocdl.sched.barrier 0
+ llvm.return
+}
+
+// ROCDL2LLVM: @rocdl_sched_group_barrier
+func.func @rocdl_sched_group_barrier() {
+ // ROCDL2LLVM-NEXT: call void @llvm.amdgcn.sched.group.barrier(i32 8, i32 1, i32 0)
+ rocdl.sched.group.barrier 8, 1, 0
+ llvm.return
+}
+
+// ROCDL2LLVM: @rocdl_iglp_opt
+func.func @rocdl_iglp_opt() {
+ // ROCDL2LLVM-NEXT: call void @llvm.amdgcn.iglp.opt(i32 0)
+ rocdl.iglp.opt 0
+ llvm.return
+}
----------------
giuseros wrote:
Yep, looks perfect now!
https://github.com/llvm/llvm-project/pull/112237
More information about the Mlir-commits
mailing list