Skip to content

Commit a0bfaa8

Browse files
committed
Rename to reductionPredicate
1 parent dd5fe88 commit a0bfaa8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ def NVVM_BarrierOp : NVVM_Op<"barrier", [AttrSizedOperandSegments]> {
10351035

10361036
let arguments = (ins Optional<I32>:$barrierId, Optional<I32>:$numberOfThreads,
10371037
OptionalAttr<BarrierReductionAttr>:$reductionOp,
1038-
Optional<I32>:$reductionOperand);
1038+
Optional<I32>:$reductionPredicate);
10391039
string llvmBuilder = [{
10401040
auto [id, args] = NVVM::BarrierOp::getIntrinsicIDAndArgs(
10411041
*op, moduleTranslation, builder);
@@ -1050,7 +1050,7 @@ def NVVM_BarrierOp : NVVM_Op<"barrier", [AttrSizedOperandSegments]> {
10501050

10511051
let assemblyFormat =
10521052
"(`id` `=` $barrierId^)? (`number_of_threads` `=` $numberOfThreads^)? "
1053-
"($reductionOp^ $reductionOperand)? (`->` type($res)^)? attr-dict";
1053+
"($reductionOp^ $reductionPredicate)? (`->` type($res)^)? attr-dict";
10541054

10551055
let builders = [OpBuilder<(ins), [{
10561056
return build($_builder, $_state, TypeRange{}, Value{}, Value{}, {}, Value{});

mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,11 +1505,11 @@ LogicalResult NVVM::BarrierOp::verify() {
15051505
return emitOpError(
15061506
"barrier id is missing, it should be set between 0 to 15");
15071507

1508-
if (getBarrierId() && (getReductionOp() || getReductionOperand()))
1508+
if (getBarrierId() && (getReductionOp() || getReductionPredicate()))
15091509
return emitOpError("reduction are only available when id is 0");
15101510

1511-
if ((getReductionOp() && !getReductionOperand()) ||
1512-
(!getReductionOp() && getReductionOperand()))
1511+
if ((getReductionOp() && !getReductionPredicate()) ||
1512+
(!getReductionOp() && getReductionPredicate()))
15131513
return emitOpError("reduction predicate and reduction operation must be "
15141514
"specified together");
15151515

@@ -1796,7 +1796,7 @@ mlir::NVVM::IDArgPair NVVM::BarrierOp::getIntrinsicIDAndArgs(
17961796
default:
17971797
llvm_unreachable("Unknown reduction operation for barrier");
17981798
}
1799-
args.push_back(mt.lookupValue(thisOp.getReductionOperand()));
1799+
args.push_back(mt.lookupValue(thisOp.getReductionPredicate()));
18001800
} else {
18011801
id = llvm::Intrinsic::nvvm_barrier_cta_sync_aligned_all;
18021802
args.push_back(barrierId);

0 commit comments

Comments
 (0)