Closed bondhugula closed 5 years ago
Fixed merge conflicts. @nicolasvasilache @River707
I see failures on the examples tests, for example:
mlir/examples/Linalg/Linalg3/Example.cpp:65:12: error: CHECK: expected string not found in input
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[N]]) {
^
<stdin>:10:2: note: scanning from here
affine.for %arg3 = 0 to %1 {
^
<stdin>:10:2: note: with "N" equal to "1"
affine.for %arg3 = 0 to %1 {
^
I see failures on the examples tests, for example:
mlir/examples/Linalg/Linalg3/Example.cpp:65:12: error: CHECK: expected string not found in input // CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[N]]) { ^ <stdin>:10:2: note: scanning from here affine.for %arg3 = 0 to %1 { ^ <stdin>:10:2: note: with "N" equal to "1" affine.for %arg3 = 0 to %1 { ^
How do I reproduce these? I already have the default cmake conf (per README.md) with LLVM_BUILD_EXAMPLES=ON, and check-mlir passes for me.
How do I reproduce these? I already have the default cmake conf (per README.md) with LLVM_BUILD_EXAMPLES=ON, and check-mlir passes for me.
That's why I kicked the "Kokoro" builds earlier to see if this is an internal only issue, and these builds seem to be passing. I'll involve @nicolasvasilache to debug this! Sorry for the delay this is causing!
How do I reproduce these? I already have the default cmake conf (per README.md) with LLVM_BUILD_EXAMPLES=ON, and check-mlir passes for me.
That's why I kicked the "Kokoro" builds earlier to see if this is an internal only issue, and these builds seem to be passing. I'll involve @nicolasvasilache to debug this! Sorry for the delay this is causing!
This one is pretty easy to fix. As a result of canonicalization, (d0) -> (d0) here turns into ()[s0] -> (s0), and (s0) -> (s0)(%[[N]]) will just be printed as %[[N]]. The check line will have to be updated to:
// CHECK: affine.for %{{.*}} = 0 to %[[N]] {
But I wanted a way to have these missing tests run - so that I could catch these and any more on my own.
Took a quick look, mlir/examples/Linalg/Linalg3/Example.cpp
and mlir/examples/Linalg/Linalg4/Example.cpp
should be very easy to fix "with a blindfold".
They all seem to be instances of map + parameter ub that should just become the parameter:
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[N]]) {
^
<stdin>:93:2: note: scanning from here
affine.for %arg3 = 0 to %1 {
^
<stdin>:93:2: note: with "N" equal to "1"
affine.for %arg3 = 0 to %1 {
and
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[M]]) step 8 {
^
<stdin>:32:2: note: scanning from here
affine.for %arg3 = 0 to %0 step 8 {
^
<stdin>:32:2: note: with "M" equal to "0"
affine.for %arg3 = 0 to %0 step 8 {
^
Maybe take a quick crack at them in this CL? Otherwise I can pick it up Monday when I know how we proceed with making changes to a CL from another user.
Fixing it isn't the issue! I was asking how I could run these tests in the first place? (Please see above - they aren't running as part of chrck-mlir.) would like to avoid a situation where some more test cases to update are found after a few days.
Fixing it isn't the issue! I was asking how I could run these tests in the first place? (Please see above - they aren't running as part of chrck-mlir.) would like to avoid a situation where some more test cases to update are found after a few days.
It seems there is a pattern missing that groups these into a convenient cmake target, but you can run them individually. E.,g,
ninja linalg-example-3 ./bin/linalg-example-3 | ./bin/FileCheck ../mlir/examples/Linalg/Linalg3/Example.cpp
Fixing it isn't the issue! I was asking how I could run these tests in the first place? (Please see above - they aren't running as part of chrck-mlir.) would like to avoid a situation where some more test cases to update are found after a few days.
It seems there is a pattern missing that groups these into a convenient cmake target, but you can run them individually. E.,g,
ninja linalg-example-3 ./bin/linalg-example-3 | ./bin/FileCheck ../mlir/examples/Linalg/Linalg3/Example.cpp
Thanks very much! This is exactly what I was looking for! Fixed now.
We still see the other Linalg example failing apparently:
/build/work/a961fabe6974af72c61c07bcbfdfb8f5a2ba/google3/runfiles/google3/third_party/llvm/llvm/projects/google_mlir/examples/Linalg/Linalg4/Example.cpp:71:12: error: CHECK: expected string not found in input
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[M]]) step 8 {
^
<stdin>:7:2: note: scanning from here
affine.for %arg3 = 0 to %0 step 8 {
^
<stdin>:7:2: note: with "M" equal to "0"
affine.for %arg3 = 0 to %0 step 8 {
^
/build/work/a961fabe6974af72c61c07bcbfdfb8f5a2ba/google3/runfiles/google3/third_party/llvm/llvm/projects/google_mlir/examples/Linalg/Linalg4/Example.cpp:101:12: error: CHECK: expected string not found in input
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[M]]) step 8 {
^
<stdin>:32:2: note: scanning from here
affine.for %arg3 = 0 to %0 step 8 {
^
<stdin>:32:2: note: with "M" equal to "0"
affine.for %arg3 = 0 to %0 step 8 {
^
/build/work/a961fabe6974af72c61c07bcbfdfb8f5a2ba/google3/runfiles/google3/third_party/llvm/llvm/projects/google_mlir/examples/Linalg/Linalg4/Example.cpp:135:12: error: CHECK: expected string not found in input
// CHECK: affine.for %{{.*}} = 0 to (d0) -> (d0)(%[[M]]) step 8 {
^
<stdin>:54:2: note: scanning from here
affine.for %arg3 = 0 to %0 step 8 {
^
<stdin>:54:2: note: with "M" equal to "0"
affine.for %arg3 = 0 to %0 step 8 {
^
We still see the other Linalg example failing apparently:
@joker-eph Fixed now.
Signed-off-by: Uday Bondhugula uday@polymagelabs.com