[Mlir-commits] [mlir] [MLIR][ROCDL] Added summary and description to BallotOp (PR #85116)
Zahi Moudallal
llvmlistbot at llvm.org
Wed Mar 13 11:37:30 PDT 2024
https://github.com/zahimoud created https://github.com/llvm/llvm-project/pull/85116
None
>From 34130f377ebf243f9976517fc8c40d47059f6d31 Mon Sep 17 00:00:00 2001
From: Zahi Moudallal <zahi at openai.com>
Date: Wed, 13 Mar 2024 11:37:02 -0700
Subject: [PATCH] [MLIR][ROCDL] Added summary and description to BallotOp
---
mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
index abb38a3df8068c..8c641b931de18e 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
@@ -162,10 +162,20 @@ def ROCDL_BallotOp :
ROCDL_Op<"ballot">,
Results<(outs LLVM_Type:$res)>,
Arguments<(ins I1:$pred)> {
+ let summary = "Vote across thread group";
+
+ let description = [{
+ This operation applies a reduction to the source predicate across all the active threads within a warp,
+ resulting in a destination predicate value that is uniform for every thread in the warp.
+
+ i1 -> i32
+ }];
+
string llvmBuilder = [{
$res = createIntrinsicCall(builder,
llvm::Intrinsic::amdgcn_ballot, {$pred}, {llvm::Type::getInt32Ty(moduleTranslation.getLLVMContext())});
}];
+
let assemblyFormat = "$pred attr-dict `:` type($res)";
}
More information about the Mlir-commits
mailing list