Issue 177819
Summary mlir-opt --test-arm-sme-tile-allocation crashes on nested ArmSME tile operations
Labels new issue
Assignees
Reporter Subway2023
    # Description
Running mlir-opt --test-arm-sme-tile-allocation on a module containing arm_sme.zero (or other ArmSME tile ops) that appear inside nested regions triggers an assertion in TileAllocation.cpp
# Reproduce
mlir-opt version: 22.1.0-rc1
location: If the **arm_sme.zero** is commented out, the crash no longer occurs.

```
module {
  func.func @main() {
    %0 = arm_sme.zero : vector<[8]x[8]xbf16>
    %1 = ptr.type_offset vector<[8]x[8]xbf16> : index
 affine.if affine_set<(d0) : (d0 >= 0)>(%1) {
      %2 = arm_sme.zero : vector<[8]x[8]xbf16>
    }
    return
  }
}
```
```
mlir-opt --test-arm-sme-tile-allocation test.mlir
```
```
mlir-opt: /mnt/sdd1/sbw/mlir/tool/llvm-project-llvmorg-22.1.0-rc1/mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp:356: {anonymous}::generateOperationNumbering(mlir::FunctionOpInterface)::<lambda(mlir::arm_sme::ArmSMETileOpInterface)>: Assertion `&op == nestedOp.getOperation() && "ArmSME tile allocation does not support nested regions"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: /mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt --test-arm-sme-tile-allocation /mnt/sdd1/sbw/mlir/data/genProgram_0103/031444_4087/mlir_steps/031444_4087_5.mlir
 #0 0x00005e8d54f4be32 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x252fe32)
 #1 0x00005e8d54f485af llvm::sys::RunSignalHandlers() (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x252c5af)
 #2 0x00005e8d54f486fc SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000705a1de45330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x0000705a1de9eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000705a1de9eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x0000705a1de9eb2c pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x0000705a1de4527e raise ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x0000705a1de288ff abort ./stdlib/abort.c:81:7
 #9 0x0000705a1de2881b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x0000705a1de3b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
#11 0x00005e8d565d629d (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x3bba29d)
#12 0x00005e8d565d6194 void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (.constprop.0) TileAllocation.cpp:0:0
#13 0x00005e8d565e0dba mlir::arm_sme::allocateSMETiles(mlir::FunctionOpInterface, bool) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x3bc4dba)
#14 0x00005e8d565e372a (anonymous namespace)::TestTileAllocationPass::runOnOperation() TileAllocation.cpp:0:0
#15 0x00005e8d5c7eb756 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dcf756)
#16 0x00005e8d5c7eba8e mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dcfa8e)
#17 0x00005e8d5c7ed673 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
#18 0x00005e8d5c7ea72d mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dce72d)
#19 0x00005e8d5c7eb5f0 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dcf5f0)
#20 0x00005e8d5c7eba8e mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dcfa8e)
#21 0x00005e8d5c7ec1e2 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dd01e2)
#22 0x00005e8d5c7ed400 mlir::PassManager::run(mlir::Operation*) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x9dd1400)
#23 0x00005e8d55012767 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#24 0x00005e8d550134ea llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, 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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#25 0x00005e8d5cbbb731 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::MemoryBufferRef const&, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0xa19f731)
#26 0x00005e8d5500a8d0 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (.part.0) MlirOptMain.cpp:0:0
#27 0x00005e8d55013b70 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x25f7b70)
#28 0x00005e8d55013da9 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x25f7da9)
#29 0x00005e8d54e45023 main (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x2429023)
#30 0x0000705a1de2a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#31 0x0000705a1de2a28b call_init ./csu/../csu/libc-start.c:128:20
#32 0x0000705a1de2a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#33 0x00005e8d54f2a405 _start (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x250e405)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to