spcl / open-earth-compiler

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

String-based OpBuilder removed #42

Closed lvaz closed 3 years ago

lvaz commented 3 years ago

Hello

OpBuilder was removed here: https://reviews.llvm.org/D93623

Meaning that OEC fails to build with latest LLVM.

gysit commented 3 years ago

Hi Leandro,

The master branch of the OEC uses a relatively old version of LLVM (you can find the compatible LLVM commit in the readme). The stencil-combine branch is much more up to date and uses a newer LLVM version that supports the new OpBuilders. Our goal is to merge the stencil-combine branch back to master sometime during February.

lvaz commented 3 years ago

Awesome! Thanks Tobias.

lvaz commented 3 years ago

Gave it another try today and it appears that stencil_combine branch depends on your patch here https://reviews.llvm.org/D95160, so I can't still build with that branch without pulling out your patch, so the latest patch that can be compiled with LLVM cc4244d55f98 is actually 0160e99. It worked this way. Can't wait to try OEC :+1:

gysit commented 3 years ago

Yes the patch is waiting for review. It enables the use of 32-bit indexes and the c memref calling convention. The patch is also available in the patches folder of the OEC repo.

In general the master branch is more stable but it works only with an older llvm version. The stencil.combine branch is quite experimental (at least if you use stencil.combine to apply different stencils on subdomains). We still work on cleaning it up but the stencil.combine functionality will probably remain a bit more unstable than the other parts.

Let me know if you have concrete plans regarding the OEC. I think it would be great to move the project to LLVM over time.

Just for reference we currently use the following passes to lower our stencils (stencil_combine branch):

./bin/oec-opt --stencil-domain-split --canonicalize --canonicalize --stencil-inlining --cse --canonicalize --cse --canonicalize --stencil-storage-materialization --stencil-shape-inference='extend-storage' --stencil-peel-odd-iterations --cse --canonicalize --stencil-combine-to-ifelse --convert-stencil-to-std --cse --parallel-loop-tiling='parallel-loop-tile-sizes=128,1,1' --canonicalize --test-gpu-greedy-parallel-loop-mapping --convert-parallel-loops-to-gpu --lower-affine --stencil-kernel-to-hsaco ../test/Examples/hdiffsa.mlir