| Issue |
203220
|
| Summary |
[mlir] Assertion `!empty()' failed.
|
| Labels |
|
| Assignees |
|
| Reporter |
Anonymous7i0em3yd
|
git version: aec0da1e9455356a32ec797430794025628b4210
system: `Ubuntu 18.04.6 LTS`
reproduce with: `mlir-opt -test-spirv-vector-unrolling a.mlir`
a.mlir:
```mlir
module {
func.func @vector_load_op_0d(%arg0: memref<200x100xf32>, %arg1: index, %arg2: index) -> vector<f32> {
%false = arith.constant false
%0 = vector.load %arg0[%arg1, %arg2] : memref<200x100xf32>, vector<f32>
%base_buffer, %offset, %sizes:2, %strides:2 = memref.extract_strided_metadata %arg0 : memref<200x100xf32> -> memref<f32>, index, index, index, index, index
bufferization.dealloc (%base_buffer : memref<f32>) if (%false)
return %0 : vector<f32>
}
}
```
stack trace:
```
mlir-opt: /data/szy/MLIR/llvm-release/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:151: const T &llvm::ArrayRef<long>::back() const [T = long]: Assertion `!empty()' 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: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -test-spirv-vector-unrolling 7.mlir
#0 0x0000563706cf9658 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fda658)
#1 0x0000563706cf64f1 llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fd74f1)
#2 0x0000563706cfa776 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007fc384429420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007fc383a6600b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007fc383a45859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x00007fc383a45729 get_sysdep_segment_value /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:509:8
#7 0x00007fc383a45729 _nl_load_domain /build/glibc-LcI20x/glibc-2.31/intl/loadmsgcat.c:970:34
#8 0x00007fc383a56fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#9 0x000056370b6aca29 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x698da29)
#10 0x000056370b6ad630 (anonymous namespace)::ReturnOpVectorUnroll::matchAndRewrite(mlir::func::ReturnOp, mlir::PatternRewriter&) const SPIRVConversion.cpp:0:0
#11 0x000056370f5cab3d void llvm::function_ref<void ()>::callback_fn<mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>)::$_0>(long) PatternApplicator.cpp:0:0
#12 0x000056370f5c749a mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<llvm::LogicalResult (mlir::Pattern const&)>) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa8a849a)
#13 0x000056370f59ff54 (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() GreedyPatternRewriteDriver.cpp:0:0
#14 0x000056370f59efd2 void llvm::function_ref<void ()>::callback_fn<(anonymous namespace)::RegionPatternRewriteDriver::simplify(bool*) &&::$_2>(long) GreedyPatternRewriteDriver.cpp:0:0
#15 0x000056370f59bfbb mlir::applyPatternsGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa87cfbb)
#16 0x000056370b6a2bd5 mlir::spirv::unrollVectorsInSignatures(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x6983bd5)
#17 0x0000563706e31ff1 mlir::(anonymous namespace)::TestSPIRVVectorUnrolling::runOnOperation() TestSPIRVVectorUnrolling.cpp:0:0
#18 0x000056370f625f42 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa906f42)
#19 0x000056370f626d84 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa907d84)
#20 0x000056370f62dc9a mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90ec9a)
#21 0x000056370f62d5cf mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xa90e5cf)
#22 0x0000563706dab56b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#23 0x0000563706daa7a6 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&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef const&, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#24 0x000056370f97a815 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) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0xac5b815)
#25 0x0000563706da03a6 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x20813a6)
#26 0x0000563706da0785 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081785)
#27 0x0000563706da0ae5 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2081ae5)
#28 0x0000563706cdf0e2 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fc00e2)
#29 0x00007fc383a47083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#30 0x0000563706cdec1e _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1fbfc1e)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs