Skip to content

Commit ab5b971

Browse files
committed
reword error message
Change-Id: I693dd3458c68169548e8b28714c0b5df1ebb1dae
1 parent b42709f commit ab5b971

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ LogicalResult TosaProfileCompliance::checkProfileOrExtension(
445445
const TosaSpecificationVersion complianceVersion{versionedTypeInfo.second};
446446
const TosaSpecificationVersion targetVersion{targetEnv.getSpecVersion()};
447447
if (!targetVersion.isBackwardsCompatibleWith(complianceVersion)) {
448-
op->emitOpError() << "illegal: requires the target specification version ("
448+
op->emitOpError() << "illegal: the target specification version ("
449449
<< stringifyVersion(targetVersion)
450-
<< ") be backwards compatible with the op compliance "
450+
<< ") is not backwards compatible with the op compliance "
451451
"specification version ("
452452
<< stringifyVersion(complianceVersion) << ")\n";
453453
return failure();

mlir/test/Dialect/Tosa/tosa-validation-version-1p0-invalid.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
func.func @test_matmul_fp8_mixed_precision_operands(%arg0: tensor<1x14x19xf8E4M3FN>, %arg1: tensor<1x19x28xf8E5M2>) -> tensor<1x14x28xf16> {
66
%azp0 = "tosa.const"() <{values = dense<0.0> : tensor<1xf8E4M3FN>}> : () -> tensor<1xf8E4M3FN>
77
%bzp0 = "tosa.const"() <{values = dense<0.0> : tensor<1xf8E5M2>}> : () -> tensor<1xf8E5M2>
8-
// expected-error@+1 {{'tosa.matmul' op illegal: requires the target specification version (1.0) be backwards compatible with the op compliance specification version (1.1)}}
8+
// expected-error@+1 {{'tosa.matmul' op illegal: the target specification version (1.0) is not backwards compatible with the op compliance specification version (1.1)}}
99
%0 = tosa.matmul %arg0, %arg1, %azp0, %bzp0 : (tensor<1x14x19xf8E4M3FN>, tensor<1x19x28xf8E5M2>, tensor<1xf8E4M3FN>, tensor<1xf8E5M2>) -> tensor<1x14x28xf16>
1010
return %0 : tensor<1x14x28xf16>
1111
}
@@ -15,7 +15,7 @@ func.func @test_matmul_fp8_mixed_precision_operands(%arg0: tensor<1x14x19xf8E4M3
1515
func.func @test_matmul_fp8_input_fp32_acc_type(%arg0: tensor<1x14x19xf8E4M3FN>, %arg1: tensor<1x19x28xf8E4M3FN>) -> tensor<1x14x28xf32> {
1616
%azp0 = "tosa.const"() <{values = dense<0.0> : tensor<1xf8E4M3FN>}> : () -> tensor<1xf8E4M3FN>
1717
%bzp0 = "tosa.const"() <{values = dense<0.0> : tensor<1xf8E4M3FN>}> : () -> tensor<1xf8E4M3FN>
18-
// expected-error@+1 {{'tosa.matmul' op illegal: requires the target specification version (1.0) be backwards compatible with the op compliance specification version (1.1)}}
18+
// expected-error@+1 {{'tosa.matmul' op illegal: the target specification version (1.0) is not backwards compatible with the op compliance specification version (1.1)}}
1919
%0 = tosa.matmul %arg0, %arg1, %azp0, %bzp0 : (tensor<1x14x19xf8E4M3FN>, tensor<1x19x28xf8E4M3FN>, tensor<1xf8E4M3FN>, tensor<1xf8E4M3FN>) -> tensor<1x14x28xf32>
2020
return %0 : tensor<1x14x28xf32>
2121
}

0 commit comments

Comments
 (0)