Skip to content

Commit 08889fd

Browse files
committed
Add summary and description
1 parent 955e552 commit 08889fd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,25 @@ def NVVM_VoteSyncOp
826826
: NVVM_Op<"vote.sync">,
827827
Results<(outs AnyTypeOf<[I32, I1]>:$res)>,
828828
Arguments<(ins I32:$mask, I1:$pred, VoteSyncKindAttr:$kind)> {
829+
let summary = "Vote across thread group";
830+
let description = [{
831+
The `vote.sync` op will cause executing thread to wait until all non-exited
832+
threads corresponding to membermask have executed `vote.sync` with the same
833+
qualifiers and same membermask value before resuming execution.
834+
835+
The vote operation kinds are:
836+
- `any`: True if source predicate is True for some thread in membermask.
837+
- `all`: True if source predicate is True for all non-exited threads in
838+
membermask.
839+
- `uni`: True if source predicate has the same value in all non-exited
840+
threads in membermask.
841+
- `ballot`: In the ballot form, the destination result is a 32 bit integer.
842+
In this form, the predicate from each thread in membermask are copied into
843+
the corresponding bit position of the result, where the bit position
844+
corresponds to the thread’s lane id.
845+
846+
[For more information, see PTX ISA](https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-vote-sync)
847+
}];
829848
string llvmBuilder = [{
830849
auto intId = getVoteSyncIntrinsicId($kind);
831850
$res = createIntrinsicCall(builder, intId, {$mask, $pred});

0 commit comments

Comments
 (0)