mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 12:46:08 +00:00
[mlir] Use llvm::is_contained (NFC)
This commit is contained in:
parent
d9ffd3219e
commit
b95028ee2d
@ -772,13 +772,13 @@ LogicalResult isAllowedSizeN(int sizeN, NVVM::WGMMATypes typeA) {
|
||||
case mlir::NVVM::WGMMATypes::bf16:
|
||||
case mlir::NVVM::WGMMATypes::e4m3:
|
||||
case mlir::NVVM::WGMMATypes::e5m2:
|
||||
if (llvm::any_of(allowedN, [&](int n) { return sizeN == n; }))
|
||||
if (llvm::is_contained(allowedN, sizeN))
|
||||
return success();
|
||||
break;
|
||||
case mlir::NVVM::WGMMATypes::u8:
|
||||
case mlir::NVVM::WGMMATypes::s8:
|
||||
case mlir::NVVM::WGMMATypes::b1:
|
||||
if (llvm::any_of(allowedNshort, [&](int n) { return sizeN == n; }))
|
||||
if (llvm::is_contained(allowedNshort, sizeN))
|
||||
return success();
|
||||
}
|
||||
return failure();
|
||||
|
@ -235,7 +235,7 @@ AffineMap StridedLayoutAttr::getAffineMap() const {
|
||||
LogicalResult
|
||||
StridedLayoutAttr::verify(function_ref<InFlightDiagnostic()> emitError,
|
||||
int64_t offset, ArrayRef<int64_t> strides) {
|
||||
if (llvm::any_of(strides, [&](int64_t stride) { return stride == 0; }))
|
||||
if (llvm::is_contained(strides, 0))
|
||||
return emitError() << "strides must not be zero";
|
||||
|
||||
return success();
|
||||
|
Loading…
x
Reference in New Issue
Block a user