Skip to content

Commit 485ae20

Browse files
committed
Rename to reductionPredicate
1 parent 6a1a71b commit 485ae20

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
@@ -979,7 +979,7 @@ def NVVM_BarrierOp : NVVM_Op<"barrier", [AttrSizedOperandSegments]> {
979979

980980
let arguments = (ins Optional<I32>:$barrierId, Optional<I32>:$numberOfThreads,
981981
OptionalAttr<BarrierReductionAttr>:$reductionOp,
982-
Optional<I32>:$reductionOperand);
982+
Optional<I32>:$reductionPredicate);
983983
string llvmBuilder = [{
984984
auto [id, args] = NVVM::BarrierOp::getIntrinsicIDAndArgs(
985985
*op, moduleTranslation, builder);
@@ -994,7 +994,7 @@ def NVVM_BarrierOp : NVVM_Op<"barrier", [AttrSizedOperandSegments]> {
994994

995995
let assemblyFormat =
996996
"(`id` `=` $barrierId^)? (`number_of_threads` `=` $numberOfThreads^)? "
997-
"($reductionOp^ $reductionOperand)? (`->` type($res)^)? attr-dict";
997+
"($reductionOp^ $reductionPredicate)? (`->` type($res)^)? attr-dict";
998998

999999
let builders = [OpBuilder<(ins), [{
10001000
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
@@ -1518,11 +1518,11 @@ LogicalResult NVVM::BarrierOp::verify() {
15181518
return emitOpError(
15191519
"barrier id is missing, it should be set between 0 to 15");
15201520

1521-
if (getBarrierId() && (getReductionOp() || getReductionOperand()))
1521+
if (getBarrierId() && (getReductionOp() || getReductionPredicate()))
15221522
return emitOpError("reduction are only available when id is 0");
15231523

1524-
if ((getReductionOp() && !getReductionOperand()) ||
1525-
(!getReductionOp() && getReductionOperand()))
1524+
if ((getReductionOp() && !getReductionPredicate()) ||
1525+
(!getReductionOp() && getReductionPredicate()))
15261526
return emitOpError("reduction predicate and reduction operation must be "
15271527
"specified together");
15281528

@@ -1820,7 +1820,7 @@ mlir::NVVM::IDArgPair NVVM::BarrierOp::getIntrinsicIDAndArgs(
18201820
default:
18211821
llvm_unreachable("Unknown reduction operation for barrier");
18221822
}
1823-
args.push_back(mt.lookupValue(thisOp.getReductionOperand()));
1823+
args.push_back(mt.lookupValue(thisOp.getReductionPredicate()));
18241824
} else {
18251825
id = llvm::Intrinsic::nvvm_barrier_cta_sync_aligned_all;
18261826
args.push_back(barrierId);

0 commit comments

Comments
 (0)