[Mlir-commits] [mlir] [mlir][nvvm] Introduce `nvvm.barrier` OP (PR #81487)
Durgadoss R
llvmlistbot at llvm.org
Mon Feb 12 09:29:43 PST 2024
================
@@ -377,6 +377,26 @@ def NVVM_Barrier0Op : NVVM_Op<"barrier0"> {
let assemblyFormat = "attr-dict";
}
+def NVVM_BarrierOp : NVVM_Op<"barrier"> {
+ let arguments = (ins
+ DefaultValuedAttr<ConfinedAttr<I32Attr, [IntMinValue<0>, IntMaxValue<15>]>, "0">:$barrierResource,
----------------
durga4github wrote:
I agree that we mostly use this as an immediate argument.
But PTX spec also says this can be a value in a register also.
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-bar-barrier
So, should we make this an operand instead of an attribute ?
https://github.com/llvm/llvm-project/pull/81487
More information about the Mlir-commits
mailing list