spcl / open-earth-compiler

development repository for the open earth compiler
https://arxiv.org/abs/2005.13014
Other
75 stars 14 forks source link

stencil-shape-inference is not working with tridiagonal example #47

Open meshtag opened 1 year ago

meshtag commented 1 year ago

I am trying to lower tridiagonal.mlir using the stencil-shape-inference pass like this,

./oec-opt --stencil-shape-inference ../../test/Examples/tridiagonal.mlir > tridiagonal_with_shapes.mlir

but am encountering the following error in this process.

../../test/Examples/tridiagonal.mlir:10:26: error: expected '->'
    %5:2 = stencil.apply seq(dim = 2, range = 0 to 64, dir = 1) (%arg3 = %3 : !stencil.temp<?x?x?xf64>, %arg4 = %4 : !stencil.temp<?x?x?xf64>) -> (!stencil.temp<?x?x?xf64>, !stencil.temp<?x?x?xf64>) {
gysit commented 1 year ago

Hi,

This sounds like there is a parsing problem. Do you get the same error if you roundtrip the IR (i.e. run the command above without calling the shape inference pass)?

Also did you try another example? The tridiagonal solvers use a feature (sequential loops) that was not very well tested and it may be that it just worked in specific branches / commits.

gysit commented 1 year ago

It looks like the tridiagonal solver example was used in the following branch:

https://github.com/spcl/open-earth-compiler/commits/loop_carried_dependencies

Except you have a specific interest in tridiagonal solvers I would recommend playing with another example.

meshtag commented 1 year ago

Do you get the same error if you roundtrip the IR

Yes!

Except you have a specific interest in tridiagonal solvers I would recommend playing with another example.

Alright