You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MLIR][NVVM] Add an explicit mask operand to elect.sync (llvm#145509)
This patch adds a mask operand to elect.sync explicitly.
When provided, this overrides the default value of 0xffffffff.
Signed-off-by: Durgadoss R <[email protected]>
The `elect.sync` instruction elects one predicated active leader
968
-
thread from among a set of threads specified in membermask.
969
-
The membermask is set to `0xFFFFFFFF` for the current version
970
-
of this Op. The predicate result is set to `True` for the
971
-
leader thread, and `False` for all other threads.
968
+
thread from among a set of threads specified in the `membermask`.
969
+
When the `membermask` is not provided explicitly, a default value
970
+
of `0xFFFFFFFF` is used. The predicate result is set to `True` for
971
+
the leader thread, and `False` for all other threads.
972
972
973
973
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parallel-synchronization-and-communication-instructions-elect-sync)
974
974
}];
975
975
976
+
let arguments = (ins Optional<I32>:$membermask);
976
977
let results = (outs I1:$pred);
977
-
let assemblyFormat = "attr-dict `->` type(results)";
978
+
let assemblyFormat = "($membermask^)? attr-dict `->` type(results)";
0 commit comments