Closed malixian closed 2 years ago
Hi there, you may need to add -reg2mem -extract-scop-stmt before -pluto-opt, sorry for the confusion. Let me know if you need any further help.
On Mon, 29 Nov 2021 at 05:17, malixian @.***> wrote:
I build the polymer with impact branch, and try to optimize matmul.mlir. But I find there is no difference between output mlir and input mlir. The command I used is polymer-opt -pluto-opt ../matmul.mlir. And the output mlir is:
module { func @matmul() { %0 = alloc() : memref<64x64xf32> %1 = alloc() : memref<64x64xf32> %2 = alloc() : memref<64x64xf32> affine.for %arg0 = 0 to 64 { affine.for %arg1 = 0 to 64 { affine.for %arg2 = 0 to 64 { %3 = affine.load %0[%arg0, %arg2] : memref<64x64xf32> %4 = affine.load %1[%arg2, %arg1] : memref<64x64xf32> %5 = mulf %3, %4 : f32 %6 = affine.load %2[%arg0, %arg1] : memref<64x64xf32> %7 = addf %5, %6 : f32 affine.store %7, %2[%arg0, %arg1] : memref<64x64xf32> } } } return } }
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kumasento/polymer/issues/119, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC42R7EU7FVZALV6YUVNWTUOMEFRANCNFSM5I6HTAHQ .
-- Ruizhe Zhao https://kumasento.github.io
Thank you for your reply @kumasento . When I run the command ./polymer-opt -reg2mem -extract-scop-stmt -pluto-opt matmul.mlir
, there occurs a core dump.
Error log is:
polymer-opt: /home/mlx/repos/MLIR-repos/polymer/llvm/mlir/lib/Analysis/AffineStructures.cpp:3050: void getIndependentConstraints(const mlir::FlatAffineConstraints &, unsigned int, unsigned int, SmallVectorImpl
&, SmallVectorImpl &): Assertion `pos < cst.getNumIds() && "invalid start position"' failed.
Interesting. Thanks for reporting this.
Would you mind trying out the main branch? Or check out any example under test/ to see if it can run on your end?
Also, you may want to check .github/workflows/buildAndTest.yml to see how polymer can be built with the main branch, which is different from impact.
On Tue, 30 Nov 2021 at 01:11, malixian @.***> wrote:
Thank you for your reply @kumasento https://github.com/kumasento . When I run the command ./polymer-opt -reg2mem -extract-scop-stmt -pluto-opt matmul.mlir, there occurs a core dump. Error log is:
polymer-opt: /home/mlx/repos/MLIR-repos/polymer/llvm/mlir/lib/Analysis/AffineStructures.cpp:3050: void getIndependentConstraints(const mlir::FlatAffineConstraints &, unsigned int, unsigned int, SmallVectorImpl &, SmallVectorImpl &): Assertion `pos < cst.getNumIds() && "invalid start position"' failed.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/kumasento/polymer/issues/119#issuecomment-982186592, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC42R6F5UTIL2RNXEMJFELUOQQCPANCNFSM5I6HTAHQ .
-- Ruizhe Zhao https://kumasento.github.io
Thanks, I will try it.
I build the polymer with impact branch, and try to optimize matmul.mlir. But I find there is no difference between output mlir and input mlir. The command I used is
polymer-opt -pluto-opt ../matmul.mlir
. And the output mlir is:When I try to build this project with main branch and use the command
./scripts/build-with-polygeist.sh
, I get a compile error:Is there any solutions to solve these problems above? Thanks.