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
511511 for (auto [resultNum, dimExpr] :
512512 llvm::enumerate (partialMap.getResults ())) {
513513 unsigned dim = cast<AffineDimExpr>(dimExpr).getPosition ();
514- if (llvm::find (reductionDims, dim) != reductionDims. end ( )) {
514+ if (llvm::is_contained (reductionDims, dim)) {
515515 partialReductionDims.push_back (resultNum);
516516 }
517517 }
@@ -553,7 +553,7 @@ struct LinalgOpPartialReductionInterface
553553 unsigned dim = cast<AffineDimExpr>(dimExpr).getPosition ();
554554 resultSizes.push_back (sizes[dim]);
555555
556- if (llvm::find (reductionDims, dim) != reductionDims. end ( )) {
556+ if (llvm::is_contained (reductionDims, dim)) {
557557 // Reduction dims are reduced, and are always outputed in the same
558558 // place. So use offset 0 for them.
559559 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) {
15051505
15061506 auto meshAxes = getMeshAxes ();
15071507 auto shiftAxis = getShiftAxis ().getZExtValue ();
1508- if (llvm::find (meshAxes, shiftAxis) == meshAxes. end ( )) {
1508+ if (! llvm::is_contained (meshAxes, shiftAxis)) {
15091509 return emitError () << " Invalid shift axis " << shiftAxis
15101510 << " . It must be one of the grouping mesh axes." ;
15111511 }
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ LogicalResult verifySubChannelQuantization(
122122 //
123123 // Therefore, we explicitly disallow the case where d = 0 to maintain
124124 // consistency and avoid these issues.
125- if (llvm::find (tensorType.getShape (), 0 ) != tensorType. getShape (). end ( )) {
125+ if (llvm::is_contained (tensorType.getShape (), 0 )) {
126126 return op->emitError () << " tensor dimension size of zero is not allowed "
127127 " with sub-channel quantization" ;
128128 }
You can’t perform that action at this time.
0 commit comments