-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[mlir][linalg] Fix Linalg runtime verification test #167814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-mlir Author: Matthias Springer (matthias-springer) ChangesThis integration test has been broken for a while. This commit partially fixes it.
Full diff: https://github.com/llvm/llvm-project/pull/167814.diff 1 Files Affected:
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
index 127ab70cb4539..610ed63168d87 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
@@ -24,17 +24,14 @@ func.func @main() {
%d5x = tensor.cast %c5x : tensor<5xf32> to tensor<?xf32>
%d4x = tensor.cast %c4x : tensor<4xf32> to tensor<?xf32>
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @simple_add(%d5x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @simple_add(%d5x, %d4x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @simple_add(%d4x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
%c1x1 = arith.constant dense<0.0> : tensor<1x1xf32>
@@ -48,71 +45,81 @@ func.func @main() {
%d4x5 = tensor.cast %c4x5 : tensor<4x5xf32> to tensor<?x?xf32>
%d5x4 = tensor.cast %c5x4 : tensor<5x4xf32> to tensor<?x?xf32>
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d1x1, %d1x1) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d1x1, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d4x4, %d1x4) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
+ // CHECK: ERROR: Runtime op verification failed
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
func.call @broadcast_add(%d1x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
func.call @broadcast_add(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @matmul_generic(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @matmul_generic(%d4x5, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @matmul_named(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.matmul
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.matmul
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @matmul_named(%d4x5, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
%c64x57 = arith.constant dense<0.0> : tensor<16x29xf32>
%c3x4 = arith.constant dense<0.0> : tensor<3x4xf32>
+ // TODO: BROKEN CHK: ERROR: Runtime op verification failed
+ // TODO: BROKEN CHK-NEXT: linalg.generic
+ // TODO: BROKEN CHK-NEXT: unexpected negative result on dimension #0 of input/output operand #0
+ // TODO: BROKEN func.call @reverse_from_3(%d5x) : (tensor<?xf32>) -> (tensor<?xf32>)
+
+ %c0x = arith.constant dense<1.0> : tensor<0xf32>
+ %d0x = tensor.cast %c0x : tensor<0xf32> to tensor<?xf32>
+
+ %c0x5 = arith.constant dense<0.0> : tensor<0x5xf32>
+ %d0x5 = tensor.cast %c0x5 : tensor<0x5xf32> to tensor<?x?xf32>
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @fill_empty_1d(%d0x) : (tensor<?xf32>) -> (tensor<?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @simple_add(%d5x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @fill_empty_2d(%d0x5) : (tensor<?x?xf32>) -> (tensor<?x?xf32>)
+
// CHECK-NOT: ERROR: Runtime op verification failed
func.call @conv(%c64x57, %c3x4) : (tensor<16x29xf32>, tensor<3x4xf32>) -> (tensor<5x7xf32>)
// CHECK-NOT: ERROR: Runtime op verification failed
func.call @reverse_from_3(%d4x) : (tensor<?xf32>) -> (tensor<?xf32>)
- // CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: unexpected negative result on dimension #0 of input/output operand #0
- func.call @reverse_from_3(%d5x) : (tensor<?xf32>) -> (tensor<?xf32>)
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @matmul_named(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- %c0x = arith.constant dense<1.0> : tensor<0xf32>
- %d0x = tensor.cast %c0x : tensor<0xf32> to tensor<?xf32>
// CHECK-NOT: ERROR: Runtime op verification failed
- func.call @fill_empty_1d(%d0x) : (tensor<?xf32>) -> (tensor<?xf32>)
+ func.call @matmul_generic(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- %c0x5 = arith.constant dense<0.0> : tensor<0x5xf32>
- %d0x5 = tensor.cast %c0x5 : tensor<0x5xf32> to tensor<?x?xf32>
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @broadcast_add(%d1x1, %d1x1) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
// CHECK-NOT: ERROR: Runtime op verification failed
- func.call @fill_empty_2d(%d0x5) : (tensor<?x?xf32>) -> (tensor<?x?xf32>)
+ func.call @broadcast_add(%d1x1, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @broadcast_add(%d4x4, %d1x4) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
return
}
|
|
@llvm/pr-subscribers-mlir-linalg Author: Matthias Springer (matthias-springer) ChangesThis integration test has been broken for a while. This commit partially fixes it.
Full diff: https://github.com/llvm/llvm-project/pull/167814.diff 1 Files Affected:
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
index 127ab70cb4539..610ed63168d87 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/runtime-verification.mlir
@@ -24,17 +24,14 @@ func.func @main() {
%d5x = tensor.cast %c5x : tensor<5xf32> to tensor<?xf32>
%d4x = tensor.cast %c4x : tensor<4xf32> to tensor<?xf32>
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @simple_add(%d5x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @simple_add(%d5x, %d4x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @simple_add(%d4x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
%c1x1 = arith.constant dense<0.0> : tensor<1x1xf32>
@@ -48,71 +45,81 @@ func.func @main() {
%d4x5 = tensor.cast %c4x5 : tensor<4x5xf32> to tensor<?x?xf32>
%d5x4 = tensor.cast %c5x4 : tensor<5x4xf32> to tensor<?x?xf32>
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d1x1, %d1x1) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d1x1, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @broadcast_add(%d4x4, %d1x4) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
+ // CHECK: ERROR: Runtime op verification failed
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
func.call @broadcast_add(%d1x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size
+
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #1 of input/output operand #2 is incompatible with inferred dimension size
func.call @broadcast_add(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @matmul_generic(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.generic
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @matmul_generic(%d4x5, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- // CHECK-NOT: ERROR: Runtime op verification failed
- func.call @matmul_named(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
-
// CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.matmul
- // CHECK: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
+ // CHECK-NEXT: linalg.matmul
+ // CHECK-NEXT: ^ dimension #0 of input/output operand #1 is incompatible with inferred dimension size
func.call @matmul_named(%d4x5, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
%c64x57 = arith.constant dense<0.0> : tensor<16x29xf32>
%c3x4 = arith.constant dense<0.0> : tensor<3x4xf32>
+ // TODO: BROKEN CHK: ERROR: Runtime op verification failed
+ // TODO: BROKEN CHK-NEXT: linalg.generic
+ // TODO: BROKEN CHK-NEXT: unexpected negative result on dimension #0 of input/output operand #0
+ // TODO: BROKEN func.call @reverse_from_3(%d5x) : (tensor<?xf32>) -> (tensor<?xf32>)
+
+ %c0x = arith.constant dense<1.0> : tensor<0xf32>
+ %d0x = tensor.cast %c0x : tensor<0xf32> to tensor<?xf32>
+
+ %c0x5 = arith.constant dense<0.0> : tensor<0x5xf32>
+ %d0x5 = tensor.cast %c0x5 : tensor<0x5xf32> to tensor<?x?xf32>
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @fill_empty_1d(%d0x) : (tensor<?xf32>) -> (tensor<?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @simple_add(%d5x, %d5x) : (tensor<?xf32>, tensor<?xf32>) -> (tensor<?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @fill_empty_2d(%d0x5) : (tensor<?x?xf32>) -> (tensor<?x?xf32>)
+
// CHECK-NOT: ERROR: Runtime op verification failed
func.call @conv(%c64x57, %c3x4) : (tensor<16x29xf32>, tensor<3x4xf32>) -> (tensor<5x7xf32>)
// CHECK-NOT: ERROR: Runtime op verification failed
func.call @reverse_from_3(%d4x) : (tensor<?xf32>) -> (tensor<?xf32>)
- // CHECK: ERROR: Runtime op verification failed
- // CHECK: linalg.generic
- // CHECK: unexpected negative result on dimension #0 of input/output operand #0
- func.call @reverse_from_3(%d5x) : (tensor<?xf32>) -> (tensor<?xf32>)
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @matmul_named(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- %c0x = arith.constant dense<1.0> : tensor<0xf32>
- %d0x = tensor.cast %c0x : tensor<0xf32> to tensor<?xf32>
// CHECK-NOT: ERROR: Runtime op verification failed
- func.call @fill_empty_1d(%d0x) : (tensor<?xf32>) -> (tensor<?xf32>)
+ func.call @matmul_generic(%d5x4, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
- %c0x5 = arith.constant dense<0.0> : tensor<0x5xf32>
- %d0x5 = tensor.cast %c0x5 : tensor<0x5xf32> to tensor<?x?xf32>
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @broadcast_add(%d1x1, %d1x1) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
// CHECK-NOT: ERROR: Runtime op verification failed
- func.call @fill_empty_2d(%d0x5) : (tensor<?x?xf32>) -> (tensor<?x?xf32>)
+ func.call @broadcast_add(%d1x1, %d4x5) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
+
+ // CHECK-NOT: ERROR: Runtime op verification failed
+ func.call @broadcast_add(%d4x4, %d1x4) : (tensor<?x?xf32>, tensor<?x?xf32>) -> (tensor<?x?xf32>)
return
}
|
| // CHECK: ERROR: Runtime op verification failed | ||
| // CHECK: linalg.generic | ||
| // CHECK: ^ dimension #1 of input/output operand #1 is incompatible with inferred dimension size | ||
| // CHECK-NEXT: linalg.generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was missing.
|
I'm merging this to unblock the CI. @ryanpholt Can you check what's up with the test case that I deactivated? |
This integration test has been broken for a while. This commit partially fixes it.
CHECK+CHECK-NEXTto ensure that the correct error lines are matched together.CHECK-NOTto the end. Having aCHECKwith the same string does not make sense after aCHECK-NOT.CHECK: ERRORfor one of the test cases.reverse_from_3, which is broken, and put a TODO.