Skip to content

Commit b95028e

Browse files
[mlir] Use llvm::is_contained (NFC)
1 parent d9ffd32 commit b95028e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,13 +772,13 @@ LogicalResult isAllowedSizeN(int sizeN, NVVM::WGMMATypes typeA) {
772772
case mlir::NVVM::WGMMATypes::bf16:
773773
case mlir::NVVM::WGMMATypes::e4m3:
774774
case mlir::NVVM::WGMMATypes::e5m2:
775-
if (llvm::any_of(allowedN, [&](int n) { return sizeN == n; }))
775+
if (llvm::is_contained(allowedN, sizeN))
776776
return success();
777777
break;
778778
case mlir::NVVM::WGMMATypes::u8:
779779
case mlir::NVVM::WGMMATypes::s8:
780780
case mlir::NVVM::WGMMATypes::b1:
781-
if (llvm::any_of(allowedNshort, [&](int n) { return sizeN == n; }))
781+
if (llvm::is_contained(allowedNshort, sizeN))
782782
return success();
783783
}
784784
return failure();

mlir/lib/IR/BuiltinAttributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ AffineMap StridedLayoutAttr::getAffineMap() const {
235235
LogicalResult
236236
StridedLayoutAttr::verify(function_ref<InFlightDiagnostic()> emitError,
237237
int64_t offset, ArrayRef<int64_t> strides) {
238-
if (llvm::any_of(strides, [&](int64_t stride) { return stride == 0; }))
238+
if (llvm::is_contained(strides, 0))
239239
return emitError() << "strides must not be zero";
240240

241241
return success();

0 commit comments

Comments
 (0)