Open runzhech opened 2 years ago
what's more, when I tried the -heuristic-split, it also failed.
polymer-opt: ../lib/Transforms/ScopStmtOpt.cc:304: void scopStmtSplit(mlir::ModuleOp, mlir::OpBuilder &, int): Assertion `(call = findCallOpForFunc(m, func)) && "The call op for the target function should be found."' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: ./polymer-opt -heuristic-split ./test/matmul.mlir
#0 0x0000000000c2393f PrintStackTraceSignalHandler(void*) (./polymer-opt+0xc2393f)
#1 0x0000000000c210ed SignalHandler(int) (./polymer-opt+0xc210ed)
#2 0x00007f074fec9980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f074d57cfb7 raise /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f074d57e921 abort /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81:0
#5 0x00007f074d56e48a __assert_fail_base /build/glibc-S9d2JN/glibc-2.27/assert/assert.c:89:0
#6 0x00007f074d56e502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
#7 0x000000000073a403 scopStmtSplit(mlir::ModuleOp, mlir::OpBuilder&, int) /home/test/polymer/build/../lib/Transforms/ScopStmtOpt.cc:306:17
#8 0x000000000073a014 (anonymous namespace)::ScopStmtSplitPass::runOnOperation() /home/test/polymer/build/../lib/Transforms/ScopStmtOpt.cc:334:18
#9 0x000000000057e881 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (.localalias.19) (./polymer-opt+0x57e881)
#10 0x000000000057fe61 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (.localalias.12) (./polymer-opt+0x57fe61)
#11 0x0000000000580955 mlir::PassManager::run(mlir::Operation*) (./polymer-opt+0x580955)
#12 0x000000000053bcdb performActions(llvm::raw_ostream&, bool, bool, llvm::SourceMgr&, mlir::MLIRContext*, mlir::PassPipelineCLParser const&) (.constprop.156) (./polymer-opt+0x53bcdb)
#13 0x000000000053c365 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, bool, bool, bool, bool, mlir::PassPipelineCLParser const&, mlir::DialectRegistry&, llvm::ThreadPool&) (./polymer-opt+0x53c365)
#14 0x000000000053c71c mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> >, mlir::PassPipelineCLParser const&, mlir::DialectRegistry&, bool, bool, bool, bool, bool) (.localalias.0) (./polymer-opt+0x53c71c)
#15 0x000000000053e2fb mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) (./polymer-opt+0x53e2fb)
#16 0x000000000041d6a4 main /home/test/polymer/build/../tools/polymer-opt/polymer-opt.cc:76:17
#17 0x00007f074d55fbf7 __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x000000000041d4ea _start (./polymer-opt+0x41d4ea)
Aborted (core dumped)
Thanks for reporting this!
-heuristic-split is not an essential step and could not work if the input file cannot be successfully processed by the main workflow (reg2mem, extract, and pluto-opt).
If possible, could you please post here your input file? I will check it out later.
Thanks for reporting this!
-heuristic-split is not an essential step and could not work if the input file cannot be successfully processed by the main workflow (reg2mem, extract, and pluto-opt).
If possible, could you please post here your input file? I will check it out later.
Thanks for your response. My input file is same as the matmul in the README.
func @matmul() {
%A = memref.alloc() : memref<64x64xf32>
%B = memref.alloc() : memref<64x64xf32>
%C = memref.alloc() : memref<64x64xf32>
affine.for %i = 0 to 64 {
affine.for %j = 0 to 64 {
affine.for %k = 0 to 64 {
%0 = affine.load %A[%i, %k] : memref<64x64xf32>
%1 = affine.load %B[%k, %j] : memref<64x64xf32>
%2 = arith.mulf %0, %1 : f32
%3 = affine.load %C[%i, %j] : memref<64x64xf32>
%4 = arith.addf %2, %3 : f32
affine.store %4, %C[%i, %j] : memref<64x64xf32>
}
}
}
return
}
Hi @runzhech
I just confirmed on my side that this input works fine.
Please check again the git commit ID and see if that is aligned with the lastest one in the main branch.
The one I tested is 3df1600.
Best
@runzhech are you compiling on a non-Ubuntu machine? I am facing the same error message when I use non-Ubuntu machine whereas everything works fine in the Ubuntu machine. Not sure why.
I'm not sure either. Perhaps it is something related to the isl package.
I meet this error when I tried to optimize the matmul example.
Thanks for any help.