You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! I was trying Polygeist to lower PolyBench C code to MLIR SCF dialect. I tried gemm.c as the input but it crashed. I am using macOS Ventura 13.7 and Apple Silicon. Here is the command.
$ ./cgeist PolyBenchC/linear-algebra/blas/gemm/gemm.c -O0 -function="*" -S -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I PolyBenchC/utilities
In file included from ./PolyBenchC/./linear-algebra/blas/gemm/gemm.c:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
93 | unsigned char *_base;| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:93:16: note: insert '_Nullable'if the pointer may be null
93 | unsigned char *_base;| ^
| _Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:93:16: note: insert '_Nonnull'if the pointer should never be null
93 | unsigned char *_base;| ^
| _Nonnull
# ... # similar warnings # ...
RecordType 0x134a10dc0 'struct __sFILEX'`-Record 0x134a10d38 '__sFILEX'ST: %struct.__sFILEX = type opaquefieldstypesAssertion failed: (types.size()), functiongetMLIRType, file clang-mlir.cc, line 5637.PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.Stack dump:0. Program arguments: /Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist ./PolyBenchC/./linear-algebra/blas/gemm/gemm.c -O0 -function=* -S -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I PolyBenchC/utilities1. <eof> parser at end of file#0 0x00000001074e6e20 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x102d3ee20)#1 0x00000001074e73fc PrintStackTraceSignalHandler(void*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x102d3f3fc)#2 0x00000001074e50b0 llvm::sys::RunSignalHandlers() (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x102d3d0b0)#3 0x00000001074e8518 SignalHandler(int) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x102d40518)#4 0x0000000196262a24 (/usr/lib/system/libsystem_platform.dylib+0x18042ea24)#5 0x0000000196233c28 (/usr/lib/system/libsystem_pthread.dylib+0x1803ffc28)#6 0x0000000196141ae8 (/usr/lib/system/libsystem_c.dylib+0x18030dae8)#7 0x0000000196140e44 (/usr/lib/system/libsystem_c.dylib+0x18030ce44)#8 0x00000001047b3618 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000b618)#9 0x00000001047b26d4 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000a6d4)#10 0x00000001047b4198 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000c198)#11 0x00000001047b31d4 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000b1d4)#12 0x00000001047b26d4 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000a6d4)#13 0x00000001047b28b4 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000a8b4)#14 0x00000001047b26d4 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000a6d4)#15 0x00000001047b4198 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000c198)#16 0x00000001047b4198 MLIRASTConsumer::getMLIRType(clang::QualType, bool*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10000c198)#17 0x00000001047e4a28 MLIRScanner::VisitDeclRefExpr(clang::DeclRefExpr*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10003ca28)#18 0x00000001047badb4 clang::StmtVisitorBase<std::__1::add_pointer, MLIRScanner, ValueCategory>::Visit(clang::Stmt*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100012db4)#19 0x00000001047c8e98 MLIRScanner::VisitCastExpr(clang::CastExpr*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100020e98)#20 0x00000001049de960 clang::StmtVisitorBase<std::__1::add_pointer, MLIRScanner, ValueCategory>::VisitImplicitCastExpr(clang::ImplicitCastExpr*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100236960)#21 0x00000001047bacf4 clang::StmtVisitorBase<std::__1::add_pointer, MLIRScanner, ValueCategory>::Visit(clang::Stmt*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100012cf4)#22 0x0000000104a7a93c MLIRScanner::getLLVM(clang::Expr*, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x1002d293c)#23 0x0000000104a83df0 MLIRScanner::VisitCallExpr(clang::CallExpr*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x1002dbdf0)#24 0x00000001047baba4 clang::StmtVisitorBase<std::__1::add_pointer, MLIRScanner, ValueCategory>::Visit(clang::Stmt*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100012ba4)#25 0x0000000104a33b84 MLIRScanner::VisitCompoundStmt(clang::CompoundStmt*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10028bb84)#26 0x00000001047b9ee4 clang::StmtVisitorBase<std::__1::add_pointer, MLIRScanner, ValueCategory>::Visit(clang::Stmt*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100011ee4)#27 0x00000001047b1d50 MLIRScanner::init(mlir::func::FuncOp, clang::FunctionDecl const*) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100009d50)#28 0x00000001047ee604 MLIRASTConsumer::run() (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100046604)#29 0x00000001047efab0 MLIRASTConsumer::HandleTranslationUnit(clang::ASTContext&) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100047ab0)#30 0x0000000111515684 clang::ParseAST(clang::Sema&, bool, bool) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10cd6d684)#31 0x000000010ab664c0 clang::ASTFrontendAction::ExecuteAction() (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x1063be4c0)#32 0x000000010ab65c8c clang::FrontendAction::Execute() (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x1063bdc8c)#33 0x00000001047f8ca4 parseMLIR(char const*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, mlir::OwningOpRef<mlir::ModuleOp>&, llvm::Triple&, llvm::DataLayout&, llvm::Triple&, llvm::DataLayout&) (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x100050ca4)#34 0x00000001047f29c4 main (/Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist+0x10004a9c4)#35 0x0000000195edbfd8 run01.cgeist_c_to_scf.sh: line 12: 35575 Abort trap: 6 /Users/peng599/pppp/comet-amais-memory/Polygeist-main/cmake-build-debug/bin/cgeist ./PolyBenchC/./linear-algebra/blas/gemm/gemm.c -O0 -function=* -S -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I PolyBenchC/utilities
Before this test, there were also some failed tests after building Polygeist as the follows.
For ninja check-cgeist, most of the failure were caused by the error of 'stdio.h' file not found. That's why in the first gemm.c test I used the -I option to include macOS's standard C headers.
After some attempts and discussion, I feel that this problem would only happen on macOS. A Linux server would work fine. Please check this thread from LLVM forum.
Hi there! I was trying Polygeist to lower PolyBench C code to MLIR SCF dialect. I tried gemm.c as the input but it crashed. I am using macOS Ventura 13.7 and Apple Silicon. Here is the command.
Before this test, there were also some failed tests after building Polygeist as the follows.
For
ninja check-cgeist
, most of the failure were caused by the error of'stdio.h' file not found
. That's why in the firstgemm.c
test I used the-I
option to include macOS's standard C headers.I have tried built Polygeist by both option 1 and option 2, and have tried branches
main
,cgo24
andivanradanov-patch-1
, but the problem remained.I was wondering if I had done something wrong. Any suggestions would be appreciated. Thank you for your time!
The text was updated successfully, but these errors were encountered: