Skip to content

Commit fd0f519

Browse files
committed
Use isa<>.
1 parent a62c37c commit fd0f519

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,8 @@ bool TosaValidation::isValidElementType(Type type) {
509509
if (isa<FloatType>(type)) {
510510
if (profile == TosaProfileEnum::BaseInference)
511511
return false;
512-
return type.isF32() || type.isF16() || type.isBF16() ||
513-
type.isFloat8E4M3FNUZ() || type.isFloat8E5M2FNUZ() ||
514-
type.isFloat8E4M3FN() || type.isFloat8E5M2();
512+
return isa<Float32Type, Float16Type, BFloat16Type, Float8E4M3FNUZType,
513+
Float8E5M2FNUZType, Float8E4M3FNType, Float8E5M2Type>(type);
515514
}
516515
if (auto intTy = dyn_cast<IntegerType>(type)) {
517516
if (intTy.isUnsigned()) {

0 commit comments

Comments
 (0)