Skip to content

conversion error in converting pytorch model into llvm using MLIR #134205

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
piyushhingu opened this issue Apr 3, 2025 · 3 comments
Open

conversion error in converting pytorch model into llvm using MLIR #134205

piyushhingu opened this issue Apr 3, 2025 · 3 comments
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) mlir

Comments

@piyushhingu
Copy link

piyushhingu commented Apr 3, 2025

0.      Program arguments: mlir-opt -pass-pipeline=builtin.module(convert-linalg-to-affine-loops,func.func(convert-affine-for-to-gpu,gpu-map-parallel-loops),test-lower-to-arm-sme,gpu-lower-to-nvvm-pipeline,convert-nvvm-to-llvm) mlirs/linalg.mlir -o mlirs/llvm.mlir
 #0 0x000056c7f496d8c9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:11
 #1 0x000056c7f496dd7b PrintStackTraceSignalHandler(void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:1
 #2 0x000056c7f496bf7f llvm::sys::RunSignalHandlers() /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Signals.cpp:105:5
 #3 0x000056c7f496e479 SignalHandler(int, siginfo_t*, void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:418:7
 #4 0x00007472f0b3c520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #5 0x00007472f0b909fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #6 0x00007472f0b909fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #7 0x00007472f0b909fc pthread_kill ./nptl/pthread_kill.c:89:10
 #8 0x00007472f0b3c476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #9 0x00007472f0b227f3 abort ./stdlib/abort.c:81:7
#10 0x000056c7f49b186c llvm::report_fatal_error(llvm::Twine const&, bool) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/ErrorHandling.cpp:126:5
#11 0x000056c7f9d13c9a mlir::detail::OpPassManagerImpl::addPass(std::unique_ptr<mlir::Pass, std::default_delete<mlir::Pass>>) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:5
#12 0x000056c7f9d13cfb mlir::OpPassManager::addPass(std::unique_ptr<mlir::Pass, std::default_delete<mlir::Pass>>) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:364:3
#13 0x000056c7fa0da2f5 (anonymous namespace)::buildTestLowerToArmSME(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/test/lib/Dialect/ArmSME/TestLowerToArmSME.cpp:63:5
#14 0x000056c7fa0da7b5 void std::__invoke_impl<void, void (*&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>(std::__invoke_other, void (*&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:7
#15 0x000056c7fa0da755 std::enable_if<is_invocable_r_v<void, void (*&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>, void>::type std::__invoke_r<void, void (*&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>(void (*&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:117:5
#16 0x000056c7fa0da68d std::_Function_handler<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), void (*)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>::_M_invoke(std::_Any_data const&, mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:2
#17 0x000056c7fa0db03e std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>::operator()(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:2
#18 0x000056c7fa0daeaa mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)::operator()(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Pass/PassRegistry.h:189:18
#19 0x000056c7fa0daddb llvm::LogicalResult std::__invoke_impl<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>(std::__invoke_other, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
#20 0x000056c7fa0dad4d std::enable_if<is_invocable_r_v<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>, llvm::LogicalResult>::type std::__invoke_r<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>(mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114:9
#21 0x000056c7fa0dab85 std::_Function_handler<llvm::LogicalResult (mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>), mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)>::_M_invoke(std::_Any_data const&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:9
#22 0x000056c7f90224fe std::function<llvm::LogicalResult (mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)>::operator()(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:9
#23 0x000056c7f901a9c1 mlir::PassRegistryEntry::addToPipeline(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Pass/PassRegistry.h:62:12
#24 0x000056c7f9d4a1ea (anonymous namespace)::TextualPipeline::addToPipeline(llvm::ArrayRef<(anonymous namespace)::TextualPipeline::PipelineElement>, mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:753:37
#25 0x000056c7f9d46ad4 (anonymous namespace)::TextualPipeline::addToPipeline(mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:618:10
#26 0x000056c7f9d467d0 mlir::parsePassPipeline(llvm::StringRef, mlir::OpPassManager&, llvm::raw_ostream&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:776:29
#27 0x000056c7f9d46369 mlir::parsePassPipeline(llvm::StringRef, llvm::raw_ostream&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:795:14
#28 0x000056c7f9d46e2e mlir::PassPipelineCLParser::addToPipeline(mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:1015:16
#29 0x000056c7f9d07d7c mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0::operator()(mlir::PassManager&) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:288:29
#30 0x000056c7f9d07d0d llvm::LogicalResult std::__invoke_impl<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>(std::__invoke_other, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
#31 0x000056c7f9d07cad std::enable_if<is_invocable_r_v<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>, llvm::LogicalResult>::type std::__invoke_r<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>(mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114:9
#32 0x000056c7f9d07bd5 std::_Function_handler<llvm::LogicalResult (mlir::PassManager&), mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0>::_M_invoke(std::_Any_data const&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:9
#33 0x000056c7f9d12396 std::function<llvm::LogicalResult (mlir::PassManager&)>::operator()(mlir::PassManager&) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:9
#34 0x000056c7f9d116de mlir::MlirOptMainConfig::setupPassPipeline(mlir::PassManager&) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h:133:14
#35 0x000056c7f9d088f6 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:470:21
#36 0x000056c7f9d08536 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
#37 0x000056c7f9d082fc 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
#38 0x000056c7f9d08296 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
#39 0x000056c7f9e88472 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
#40 0x000056c7f9e87a85 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
#41 0x000056c7f9d04833 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
#42 0x000056c7f9d04bd5 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
#43 0x000056c7f9d04da8 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:685:10
#44 0x000056c7f48e4ad3 main /workspace/docker/torch-mlir/externals/llvm-project/mlir/tools/mlir-opt/mlir-opt.cpp:329:33
#45 0x00007472f0b23d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#46 0x00007472f0b23e40 call_init ./csu/../csu/libc-start.c:128:20
#47 0x00007472f0b23e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#48 0x000056c7f48e46d5 _start (/usr/local/bin/mlir-opt+0x29e16d5)
@llvmbot llvmbot added the mlir label Apr 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 3, 2025

@llvm/issue-subscribers-mlir

Author: Hingu piyush (piyushhingu)

  1.  Program arguments: mlir-opt -pass-pipeline=builtin.module(convert-linalg-to-affine-loops,func.func(convert-affine-for-to-gpu,gpu-map-parallel-loops),test-lower-to-arm-sme,gpu-lower-to-nvvm-pipeline,convert-nvvm-to-llvm) mlirs/linalg.mlir -o mlirs/llvm.mlir
    

#0 0x000056c7f496d8c9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:804:11
#1 0x000056c7f496dd7b PrintStackTraceSignalHandler(void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:1
#2 0x000056c7f496bf7f llvm::sys::RunSignalHandlers() /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Signals.cpp:105:5
#3 0x000056c7f496e479 SignalHandler(int, siginfo_t*, void*) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/Unix/Signals.inc:418:7
#4 0x00007472f0b3c520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007472f0b909fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007472f0b909fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#7 0x00007472f0b909fc pthread_kill ./nptl/pthread_kill.c:89:10
#8 0x00007472f0b3c476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#9 0x00007472f0b227f3 abort ./stdlib/abort.c:81:7
#10 0x000056c7f49b186c llvm::report_fatal_error(llvm::Twine const&, bool) /workspace/docker/torch-mlir/externals/llvm-project/llvm/lib/Support/ErrorHandling.cpp:126:5
#11 0x000056c7f9d13c9a mlir::detail::OpPassManagerImpl::addPass(std::unique_ptr<mlir::Pass, std::default_delete<mlir::Pass>>) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:0:5
#12 0x000056c7f9d13cfb mlir::OpPassManager::addPass(std::unique_ptr<mlir::Pass, std::default_delete<mlir::Pass>>) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/Pass.cpp:364:3
#13 0x000056c7fa0da2f5 (anonymous namespace)::buildTestLowerToArmSME(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/test/lib/Dialect/ArmSME/TestLowerToArmSME.cpp:63:5
#14 0x000056c7fa0da7b5 void std::__invoke_impl<void, void (&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>(std::__invoke_other, void (&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:7
#15 0x000056c7fa0da755 std::enable_if<is_invocable_r_v<void, void (&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>, void>::type std::__invoke_r<void, void (&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&>(void (&)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:117:5
#16 0x000056c7fa0da68d std::_Function_handler<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&), void (
)(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>::_M_invoke(std::_Any_data const&, mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:2
#17 0x000056c7fa0db03e std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>::operator()(mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:2
#18 0x000056c7fa0daeaa mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)::operator()(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Pass/PassRegistry.h:189:18
#19 0x000056c7fa0daddb llvm::LogicalResult std::__invoke_impl<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>(std::__invoke_other, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
#20 0x000056c7fa0dad4d std::enable_if<is_invocable_r_v<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>, llvm::LogicalResult>::type std::__invoke_r<llvm::LogicalResult, mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>>(mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114:9
#21 0x000056c7fa0dab85 std::_Function_handler<llvm::LogicalResult (mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>), mlir::PassPipelineRegistration<(anonymous namespace)::TestLowerToArmSMEOptions>::PassPipelineRegistration(llvm::StringRef, llvm::StringRef, std::function<void (mlir::OpPassManager&, (anonymous namespace)::TestLowerToArmSMEOptions const&)>)::'lambda'(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)>::_M_invoke(std::_Any_data const&, mlir::OpPassManager&, llvm::StringRef&&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>&&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:9
#22 0x000056c7f90224fe std::function<llvm::LogicalResult (mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>)>::operator()(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:9
#23 0x000056c7f901a9c1 mlir::PassRegistryEntry::addToPipeline(mlir::OpPassManager&, llvm::StringRef, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Pass/PassRegistry.h:62:12
#24 0x000056c7f9d4a1ea (anonymous namespace)::TextualPipeline::addToPipeline(llvm::ArrayRef<(anonymous namespace)::TextualPipeline::PipelineElement>, mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:753:37
#25 0x000056c7f9d46ad4 (anonymous namespace)::TextualPipeline::addToPipeline(mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:618:10
#26 0x000056c7f9d467d0 mlir::parsePassPipeline(llvm::StringRef, mlir::OpPassManager&, llvm::raw_ostream&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:776:29
#27 0x000056c7f9d46369 mlir::parsePassPipeline(llvm::StringRef, llvm::raw_ostream&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:795:14
#28 0x000056c7f9d46e2e mlir::PassPipelineCLParser::addToPipeline(mlir::OpPassManager&, llvm::function_ref<llvm::LogicalResult (llvm::Twine const&)>) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Pass/PassRegistry.cpp:1015:16
#29 0x000056c7f9d07d7c mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0::operator()(mlir::PassManager&) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:288:29
#30 0x000056c7f9d07d0d llvm::LogicalResult std::__invoke_impl<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>(std::__invoke_other, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
#31 0x000056c7f9d07cad std::enable_if<is_invocable_r_v<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>, llvm::LogicalResult>::type std::__invoke_r<llvm::LogicalResult, mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&>(mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114:9
#32 0x000056c7f9d07bd5 std::_Function_handler<llvm::LogicalResult (mlir::PassManager&), mlir::MlirOptMainConfig::setPassPipelineParser(mlir::PassPipelineCLParser const&)::$_0>::_M_invoke(std::_Any_data const&, mlir::PassManager&) /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:290:9
#33 0x000056c7f9d12396 std::function<llvm::LogicalResult (mlir::PassManager&)>::operator()(mlir::PassManager&) const /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:590:9
#34 0x000056c7f9d116de mlir::MlirOptMainConfig::setupPassPipeline(mlir::PassManager&) const /workspace/docker/torch-mlir/externals/llvm-project/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h:133:14
#35 0x000056c7f9d088f6 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:470:21
#36 0x000056c7f9d08536 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
#37 0x000056c7f9d082fc 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
#38 0x000056c7f9d08296 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
#39 0x000056c7f9e88472 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
#40 0x000056c7f9e87a85 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
#41 0x000056c7f9d04833 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
#42 0x000056c7f9d04bd5 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
#43 0x000056c7f9d04da8 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) /workspace/docker/torch-mlir/externals/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:685:10
#44 0x000056c7f48e4ad3 main /workspace/docker/torch-mlir/externals/llvm-project/mlir/tools/mlir-opt/mlir-opt.cpp:329:33
#45 0x00007472f0b23d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#46 0x00007472f0b23e40 call_init ./csu/../csu/libc-start.c:128:20
#47 0x00007472f0b23e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#48 0x000056c7f48e46d5 _start (/usr/local/bin/mlir-opt+0x29e16d5)

@EugeneZelenko EugeneZelenko added the crash Prefer [crash-on-valid] or [crash-on-invalid] label Apr 3, 2025
@ftynse
Copy link
Member

ftynse commented Apr 18, 2025

Please provide a way to reproduce the issue, e.g., the input IR.

@piyushhingu
Copy link
Author

Lenet-5_linalg_mlir.txt

this is an sample file of converted lenet-5 into linalg mlir and than run this command and you can do same for other ML model like inception-v3 for same
convert python model into onnx than using this command you can convert model into linalg

torch-mlir-import-onnx mlirs/model.onnx -o mlirs/onnx_torch.mlir
torch-mlir-opt --torch-onnx-to-torch-backend-pipeline mlirs/onnx_torch.mlir -o mlirs/torch.mlir
torch-mlir-opt --torch-backend-to-linalg-on-tensors-backend-pipeline mlirs/torch.mlir -o mlirs/linalg.mlir

@EugeneZelenko EugeneZelenko added the incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) label Apr 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) mlir
Projects
None yet
Development

No branches or pull requests

4 participants