llvm-project
llvm-project copied to clipboard
[mlir][arith](int-range-optimizations) mlir-opt crashes at BuiltinAttributes.cpp:1219 with assertion `type.hasStaticShape() && "type must have static shape"' failed.
git version: c45b4e4d00bed488d6ece5608560561732ae5b9e
MLIR Program:
module {
func.func @m(%arg0: tensor<4x?xi8>) -> () {
%2 = arith.xori %arg0, %arg0 : tensor<4x?xi8>
return
}
}
Reproduce Command: mlir-opt -int-range-optimizations a.mlir
StackTrace:
mlir-opt: /data2/dependency/dev/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:1219: static mlir::DenseElementsAttr mlir::DenseTypedElementsAttr::getRaw(mlir::ShapedType, llvm::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 and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /data2/dependency/dev/llvm-project/build/bin/mlir-opt -int-range-optimizations a.mlir
#0 0x000055f0788afb1f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1fa6b1f)
#1 0x000055f0788ac2bc llvm::sys::RunSignalHandlers() (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1fa32bc)
#2 0x000055f0788ac463 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007fac4fbfe420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007fac4f6e900b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#5 0x00007fac4f6c8859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#6 0x00007fac4f6c8729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#7 0x00007fac4f6d9fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#8 0x000055f081b80f58 mlir::DenseTypedElementsAttr::getRaw(mlir::ShapedType, llvm::ArrayRef<char>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb277f58)
#9 0x000055f081b85b19 mlir::DenseElementsAttr::get(mlir::ShapedType, llvm::ArrayRef<mlir::Attribute>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb27cb19)
#10 0x000055f081b66e33 mlir::Builder::getZeroAttr(mlir::Type) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb25de33)
#11 0x000055f0816cdef6 mlir::arith::XOrIOp::fold(mlir::arith::XOrIOpGenericAdaptor<llvm::ArrayRef<mlir::Attribute>>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xadc4ef6)
#12 0x000055f08173cca2 mlir::RegisteredOperationName::Model<mlir::arith::XOrIOp>::foldHook(mlir::Operation*, llvm::ArrayRef<mlir::Attribute>, llvm::SmallVectorImpl<mlir::OpFoldResult>&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xae33ca2)
#13 0x000055f081c32924 mlir::Operation::fold(llvm::ArrayRef<mlir::Attribute>, llvm::SmallVectorImpl<mlir::OpFoldResult>&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb329924)
#14 0x000055f0819f9bc8 mlir::dataflow::SparseConstantPropagation::visitOperation(mlir::Operation*, llvm::ArrayRef<mlir::dataflow::Lattice<mlir::dataflow::ConstantValue> const*>, llvm::ArrayRef<mlir::dataflow::Lattice<mlir::dataflow::ConstantValue>*>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb0f0bc8)
#15 0x000055f081a2730b mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visitOperation(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11e30b)
#16 0x000055f081a282cd mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f2cd)
#17 0x000055f081a28782 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f782)
#18 0x000055f081a28782 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f782)
#19 0x000055f0819b7c7c mlir::DataFlowSolver::initializeAndRun(mlir::Operation*, llvm::function_ref<bool (mlir::DataFlowAnalysis&)>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb0aec7c)
#20 0x000055f07feb97f0 (anonymous namespace)::IntRangeOptimizationsPass::runOnOperation() IntRangeOptimizations.cpp:0:0
#21 0x000055f0818b9cc1 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb0cc1)
#22 0x000055f0818ba050 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb1050)
#23 0x000055f0818bc104 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb3104)
#24 0x000055f0818bd181 mlir::PassManager::run(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb4181)
#25 0x000055f07897593b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#26 0x000055f07897647f processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, mlir::SourceMgrDiagnosticVerifierHandler*, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#27 0x000055f0789766ab 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
#28 0x000055f081c89df5 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) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb380df5)
#29 0x000055f07896c6f4 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
#30 0x000055f078976bc7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x206dbc7)
#31 0x000055f078976e03 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x206de03)
#32 0x000055f0787f48fc main (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1eeb8fc)
#33 0x00007fac4f6ca083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#34 0x000055f07888c0ee _start (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1f830ee)
Aborted (core dumped)
@llvm/issue-subscribers-mlir
Author: Aran-414
git version: c45b4e4d00bed488d6ece5608560561732ae5b9e
MLIR Program:
module {
func.func @<!-- -->m(%arg0: tensor<4x?xi8>) -> () {
%2 = arith.xori %arg0, %arg0 : tensor<4x?xi8>
return
}
}
Reproduce Command: mlir-opt -int-range-optimizations a.mlir
StackTrace:
mlir-opt: /data2/dependency/dev/llvm-project/mlir/lib/IR/BuiltinAttributes.cpp:1219: static mlir::DenseElementsAttr mlir::DenseTypedElementsAttr::getRaw(mlir::ShapedType, llvm::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 and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /data2/dependency/dev/llvm-project/build/bin/mlir-opt -int-range-optimizations a.mlir
#<!-- -->0 0x000055f0788afb1f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1fa6b1f)
#<!-- -->1 0x000055f0788ac2bc llvm::sys::RunSignalHandlers() (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1fa32bc)
#<!-- -->2 0x000055f0788ac463 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#<!-- -->3 0x00007fac4fbfe420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#<!-- -->4 0x00007fac4f6e900b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#<!-- -->5 0x00007fac4f6c8859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#<!-- -->6 0x00007fac4f6c8729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#<!-- -->7 0x00007fac4f6d9fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#<!-- -->8 0x000055f081b80f58 mlir::DenseTypedElementsAttr::getRaw(mlir::ShapedType, llvm::ArrayRef<char>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb277f58)
#<!-- -->9 0x000055f081b85b19 mlir::DenseElementsAttr::get(mlir::ShapedType, llvm::ArrayRef<mlir::Attribute>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb27cb19)
#<!-- -->10 0x000055f081b66e33 mlir::Builder::getZeroAttr(mlir::Type) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb25de33)
#<!-- -->11 0x000055f0816cdef6 mlir::arith::XOrIOp::fold(mlir::arith::XOrIOpGenericAdaptor<llvm::ArrayRef<mlir::Attribute>>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xadc4ef6)
#<!-- -->12 0x000055f08173cca2 mlir::RegisteredOperationName::Model<mlir::arith::XOrIOp>::foldHook(mlir::Operation*, llvm::ArrayRef<mlir::Attribute>, llvm::SmallVectorImpl<mlir::OpFoldResult>&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xae33ca2)
#<!-- -->13 0x000055f081c32924 mlir::Operation::fold(llvm::ArrayRef<mlir::Attribute>, llvm::SmallVectorImpl<mlir::OpFoldResult>&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb329924)
#<!-- -->14 0x000055f0819f9bc8 mlir::dataflow::SparseConstantPropagation::visitOperation(mlir::Operation*, llvm::ArrayRef<mlir::dataflow::Lattice<mlir::dataflow::ConstantValue> const*>, llvm::ArrayRef<mlir::dataflow::Lattice<mlir::dataflow::ConstantValue>*>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb0f0bc8)
#<!-- -->15 0x000055f081a2730b mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::visitOperation(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11e30b)
#<!-- -->16 0x000055f081a282cd mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f2cd)
#<!-- -->17 0x000055f081a28782 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f782)
#<!-- -->18 0x000055f081a28782 mlir::dataflow::AbstractSparseForwardDataFlowAnalysis::initializeRecursively(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb11f782)
#<!-- -->19 0x000055f0819b7c7c mlir::DataFlowSolver::initializeAndRun(mlir::Operation*, llvm::function_ref<bool (mlir::DataFlowAnalysis&)>) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb0aec7c)
#<!-- -->20 0x000055f07feb97f0 (anonymous namespace)::IntRangeOptimizationsPass::runOnOperation() IntRangeOptimizations.cpp:0:0
#<!-- -->21 0x000055f0818b9cc1 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb0cc1)
#<!-- -->22 0x000055f0818ba050 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb1050)
#<!-- -->23 0x000055f0818bc104 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb3104)
#<!-- -->24 0x000055f0818bd181 mlir::PassManager::run(mlir::Operation*) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xafb4181)
#<!-- -->25 0x000055f07897593b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#<!-- -->26 0x000055f07897647f processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::MemoryBufferRef, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, mlir::SourceMgrDiagnosticVerifierHandler*, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#<!-- -->27 0x000055f0789766ab 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
#<!-- -->28 0x000055f081c89df5 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) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0xb380df5)
#<!-- -->29 0x000055f07896c6f4 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
#<!-- -->30 0x000055f078976bc7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x206dbc7)
#<!-- -->31 0x000055f078976e03 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x206de03)
#<!-- -->32 0x000055f0787f48fc main (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1eeb8fc)
#<!-- -->33 0x00007fac4f6ca083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#<!-- -->34 0x000055f07888c0ee _start (/data2/dependency/dev/llvm-project/build/bin/mlir-opt+0x1f830ee)
Aborted (core dumped)
I'd like to be assigned to this issue please
I'd like to be assigned to this issue please
Just prepare pull request and mention it on this page.
I confirmed that this crash is fixed by #212072.