Skip to content

Commit 486ca71

Browse files
committed
[mlir][tosa]: Enable float element-types on default in TosaValidation
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 486ca71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

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

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

0 commit comments

Comments
 (0)