Skip to content

Commit 1777df3

Browse files
committed
[MLIR][TosaValidation] Enable float element-types on default
After change in tosa-validation profiles to list-option, float element types where no more allowed in default (where profile is/contains undefined enumeration value). This change allows floats when undefined value is contained in the profile.
1 parent 7d1e283 commit 1777df3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,9 @@ LogicalResult TosaValidation::applyVariableCheck(Operation *op) {
521521

522522
bool TosaValidation::isValidElementType(Type type) {
523523
if (isa<FloatType>(type)) {
524-
if (!isEnabledProfile(TosaProfileEnum::MainInference))
525-
return false;
524+
if (!isEnabledProfile(TosaProfileEnum::Undefined) &&
525+
!isEnabledProfile(TosaProfileEnum::MainInference))
526+
return false;
526527
return type.isF32() || type.isF16() || type.isBF16();
527528
}
528529
if (auto intTy = dyn_cast<IntegerType>(type)) {

0 commit comments

Comments
 (0)