[Mlir-commits] [mlir] [mlir][ROCDL] Add synchronization primitives (#1077) (PR #80888)
Giuseppe Rossini
llvmlistbot at llvm.org
Wed Feb 7 03:07:33 PST 2024
================
@@ -192,6 +192,18 @@ def ROCDL_BarrierOp : ROCDL_Op<"barrier"> {
let assemblyFormat = "attr-dict";
}
+def ROCDL_SetPrioOp : ROCDL_IntrOp<"s.setprio", [], [], [], 0>,
+ Arguments<(ins I16:$priority)> {
+ let results = (outs);
+ let assemblyFormat = "$priority attr-dict";
+}
+
+def ROCDL_SchedBarrier : ROCDL_IntrOp<"sched.barrier", [], [], [], 0>,
+ Arguments<(ins I32:$mask)> {
----------------
giuseros wrote:
Any suggestion on how to do that? I mean I tried:
```
def ROCDL_SetPrioOp : ROCDL_IntrOp<"s.setprio", [], [], [], 0>,
Arguments<(ins I16Attr:$priority)> {
let results = (outs);
let assemblyFormat = "attr-dict";
}
```
But this does not work, since the attribute is ignored by `ROCDL_IntrOp`. I tried to manually create a `llvmBuilder`, but the call to `createIntrinsicCall` is not happy with the inputs being non-Values. I also tried `createIntrinsicCallWithRange` without any luck.
https://github.com/llvm/llvm-project/pull/80888
More information about the Mlir-commits
mailing list