-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[MLIR] SymbolOpInterface pass crashes on module that does not define a symbol #134586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-mlir Author: Hingu piyush (piyushhingu)
0. Program arguments: mlir-opt mlirs/linalg.mlir --linalg-generalize-named-ops --test-memref-stride-calculation
```
#0 0x000058e0bd4ed8c9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:11
#1 0x000058e0bd4edd7b PrintStackTraceSignalHandler(void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:1
#2 0x000058e0bd4ebf7f llvm::sys::RunSignalHandlers() /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Signals.cpp:105:5
#3 0x000058e0bd4ee479 SignalHandler(int, siginfo_t*, void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:418:7
#4 0x00007f4f5d8be520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007f4f5d9129fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007f4f5d9129fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#7 0x00007f4f5d9129fc pthread_kill ./nptl/pthread_kill.c:89:10
#8 0x00007f4f5d8be476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#9 0x00007f4f5d8a47f3 abort ./stdlib/abort.c:81:7
#10 0x00007f4f5d8a471b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x00007f4f5d8b5e96 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#12 0x000058e0c1bc5754 decltype(auto) llvm::cast<mlir::SymbolOpInterface, mlir::Operation>(mlir::Operation*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/include/llvm/Support/Casting.h:579:39
#13 0x000058e0c2cc1d1d mlir::InterfacePass<mlir::SymbolOpInterface>::getOperation() /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Pass/Pass.h:443:38
#14 0x000058e0c2cc7655 (anonymous namespace)::TestMemRefStrideCalculation::runOnOperation() /workspace/docker/torch-mlir/externals/llvm-project/mlir/test/lib/Analysis/TestMemRefStrideCalculation.cpp:33:34
#15 0x000058e0c28998c4 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1::operator()() const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:17
#16 0x000058e0c2899865 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) /workspace/docker/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:5
#17 0x000058e0bd512309 llvm::function_ref<void ()>::operator()() const /workspace/docker/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:5
#18 0x000058e0c289d1db void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/IR/MLIRContext.h:281:3
#19 0x000058e0c28954a7 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:532:17
#20 0x000058e0c28959c7 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:592:16
#21 0x000058e0c2897338 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:905:10
#22 0x000058e0c2897273 mlir::PassManager::run(mlir::Operation*) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:885:60
#23 0x000058e0c2888945 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:474:17
#24 0x000058e0c2888536 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPoolInterface*) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:542:12
#25 0x000058e0c28882fc mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:625:12
#26 0x000058e0c2888296 llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) /workspace/docker/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
#27 0x000058e0c2a08472 llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) const /workspace/docker/torch-mlir/externals/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
#28 0x000058e0c2a07a85 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Support/ToolUtilities.cpp:27:12
#29 0x000058e0c2884833 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:628:10
#30 0x000058e0c2884bd5 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:669:14
#31 0x000058e0c2884da8 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:685:10
#32 0x000058e0bd464ad3 main /workspace/docker/torch-mlir/externals/llvm-project/mlir/tools/mlir-opt/mlir-opt.cpp:329:33
#33 0x00007f4f5d8a5d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#34 0x00007f4f5d8a5e40 call_init ./csu/../csu/libc-start.c:128:20
#35 0x00007f4f5d8a5e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#36 0x000058e0bd4646d5 _start (/usr/local/bin/mlir-opt+0x29e16d5)
```
|
Can you provide the IR to reproduce the issue? |
llvm_mlir.txt |
The problem is that the pass is attached to the module instead of the function, and the module is carrying a symbol "optionally", so it may or may not be casted. |
Yes, now its working and for other like lenet-5 or small CNN model its give LLVM IR |
Please use Discourse for this kind of questions, this is not related to the bug tracked here anymore. |
The text was updated successfully, but these errors were encountered: