Issue |
148369
|
Summary |
[MLIR] Crash in `-test-spirv-func-signature-conversion` when handling dynamic-shaped tensor types
|
Labels |
mlir
|
Assignees |
|
Reporter |
sweead
|
test commit: [f2e244f](https://github.com/llvm/llvm-project/commit/f2e244f443c99f814216bef37a82f1b8d3e5975d)
step to reproduce:
```
mlir-opt -test-spirv-func-signature-conversion test.mlir
```
minimal test case:
```
module {
func.func @main(%arg0: tensor<?x2xi8>) {
return
}
}
```
Crash backtrace:
```
mlir-opt: /home/workdir/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:1358: static DenseElementsAttr mlir::DenseIntOrFPElementsAttr::getRaw(ShapedType, ArrayRef<char>): Assertion `type.hasStaticShape() && "type must have static shape"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: mlir-opt -test-spirv-func-signature-conversion test.mlir
#0 0x00005597e2bd9028 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/workdir/llvm-project/build/bin/mlir-opt+0x1421028)
#1 0x00005597e2bd66a5 llvm::sys::RunSignalHandlers() (/home/workdir/llvm-project/build/bin/mlir-opt+0x141e6a5)
#2 0x00005597e2bda141 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f40426f5520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f40427499fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007f40426f5476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007f40426db7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007f40426db71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007f40426ece96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x00005597e61a6536 mlir::DenseIntOrFPElementsAttr::getRaw(mlir::ShapedType, llvm::ArrayRef<char>) (/home/workdir/llvm-project/build/bin/mlir-opt+0x49ee536)
#10 0x00005597e61a5535 mlir::DenseElementsAttr::get(mlir::ShapedType, llvm::ArrayRef<mlir::Attribute>) (/home/workdir/llvm-project/build/bin/mlir-opt+0x49ed535)
#11 0x00005597e6198970 mlir::Builder::getZeroAttr(mlir::Type) (/home/workdir/llvm-project/build/bin/mlir-opt+0x49e0970)
#12 0x00005597e77b0bcf (anonymous namespace)::FuncOpVectorUnroll::matchAndRewrite(mlir::func::FuncOp, mlir::PatternRewriter&) const SPIRVConversion.cpp:0:0
#13 0x00005597e89c8132 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
#14 0x00005597e89c4e2f 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&)>) (/home/workdir/llvm-project/build/bin/mlir-opt+0x720ce2f)
#15 0x00005597e613227a (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() GreedyPatternRewriteDriver.cpp:0:0
#16 0x00005597e612ead3 mlir::applyPatternsGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x4976ad3)
#17 0x00005597e77a9085 mlir::spirv::unrollVectorsInSignatures(mlir::Operation*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x5ff1085)
#18 0x00005597e60b0a93 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48f8a93)
#19 0x00005597e60b1332 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48f9332)
#20 0x00005597e60b3b0e mlir::PassManager::run(mlir::Operation*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48fbb0e)
#21 0x00005597e60aba7b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#22 0x00005597e60ab6d4 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&) MlirOptMain.cpp:0:0
#23 0x00005597e615b425 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) (/home/workdir/llvm-project/build/bin/mlir-opt+0x49a3425)
#24 0x00005597e60a48c2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48ec8c2)
#25 0x00005597e60a4b78 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48ecb78)
#26 0x00005597e60a4d92 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x48ecd92)
#27 0x00005597e2bb7a67 main (/home/workdir/llvm-project/build/bin/mlir-opt+0x13ffa67)
#28 0x00007f40426dcd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#29 0x00007f40426dce40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#30 0x00005597e2bb7505 _start (/home/workdir/llvm-project/build/bin/mlir-opt+0x13ff505)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs