File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ struct LinalgOpPartialReductionInterface
511
511
for (auto [resultNum, dimExpr] :
512
512
llvm::enumerate (partialMap.getResults ())) {
513
513
unsigned dim = cast<AffineDimExpr>(dimExpr).getPosition ();
514
- if (llvm::find (reductionDims, dim) != reductionDims. end ( )) {
514
+ if (llvm::is_contained (reductionDims, dim)) {
515
515
partialReductionDims.push_back (resultNum);
516
516
}
517
517
}
@@ -553,7 +553,7 @@ struct LinalgOpPartialReductionInterface
553
553
unsigned dim = cast<AffineDimExpr>(dimExpr).getPosition ();
554
554
resultSizes.push_back (sizes[dim]);
555
555
556
- if (llvm::find (reductionDims, dim) != reductionDims. end ( )) {
556
+ if (llvm::is_contained (reductionDims, dim)) {
557
557
// Reduction dims are reduced, and are always outputed in the same
558
558
// place. So use offset 0 for them.
559
559
resultOffsets.push_back (b.getIndexAttr (0 ));
Original file line number Diff line number Diff line change @@ -1505,7 +1505,7 @@ LogicalResult ShiftOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
1505
1505
1506
1506
auto meshAxes = getMeshAxes ();
1507
1507
auto shiftAxis = getShiftAxis ().getZExtValue ();
1508
- if (llvm::find (meshAxes, shiftAxis) == meshAxes. end ( )) {
1508
+ if (! llvm::is_contained (meshAxes, shiftAxis)) {
1509
1509
return emitError () << " Invalid shift axis " << shiftAxis
1510
1510
<< " . It must be one of the grouping mesh axes." ;
1511
1511
}
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ LogicalResult verifySubChannelQuantization(
122
122
//
123
123
// Therefore, we explicitly disallow the case where d = 0 to maintain
124
124
// consistency and avoid these issues.
125
- if (llvm::find (tensorType.getShape (), 0 ) != tensorType. getShape (). end ( )) {
125
+ if (llvm::is_contained (tensorType.getShape (), 0 )) {
126
126
return op->emitError () << " tensor dimension size of zero is not allowed "
127
127
" with sub-channel quantization" ;
128
128
}
You can’t perform that action at this time.
0 commit comments