-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Closed
Copy link
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:tosa

Description
git version: 8641cdf
system: Ubuntu 20.04.6 LTS (Focal Fossa)
reproduced with: mlir-opt --tosa-infer-shapes a.mlir
a.mlir:
func.func private @func2() {
%c25 = arith.constant 25 : index
%11 = tensor.empty(%c25) : tensor<?x31xi16>
%55 = tosa.slice %11 {size = array<i64>, start = array<i64>} : (tensor<?x31xi16>) -> tensor<*xi16>
%105 = tosa.reduce_min %55 {axis = 0 : i32} : (tensor<*xi16>) -> tensor<1x31xi16>
return
}
trace:
mlir-opt: /data/bin/llvm-project/llvm/include/llvm/ADT/SmallVector.h:294: T& llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::operator[](llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type) [with T = long int; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::reference = long int&; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type = long unsigned int]: Assertion `idx < size()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /data/bin/llvm-project/build/bin/mlir-opt --tosa-infer-shapes a.mlir
#0 0x0000555e213412ef llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/bin/llvm-project/build/bin/mlir-opt+0x158f2ef)
#1 0x0000555e2133e384 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f1ed6543420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#3 0x00007f1ed602e00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
#4 0x00007f1ed600d859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
#5 0x00007f1ed600d729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
#6 0x00007f1ed601efd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
#7 0x0000555e23022b43 ReduceInferReturnTypes(mlir::ShapeAdaptor, mlir::Type, mlir::IntegerAttr, llvm::SmallVectorImpl<mlir::ShapedTypeComponents>&) TosaOps.cpp:0:0
#8 0x0000555e23023b82 mlir::tosa::ReduceMinOp::inferReturnTypeComponents(mlir::MLIRContext*, std::optional<mlir::Location>, mlir::ValueShapeRange, mlir::DictionaryAttr, mlir::OpaqueProperties, mlir::RegionRange, llvm::SmallVectorImpl<mlir::ShapedTypeComponents>&) (/data/bin/llvm-project/build/bin/mlir-opt+0x3271b82)
#9 0x0000555e2307b0aa (anonymous namespace)::propagateShapesInRegion(mlir::Region&) TosaInferShapes.cpp:0:0
#10 0x0000555e2307cb3e (anonymous namespace)::TosaInferShapes::runOnOperation() TosaInferShapes.cpp:0:0
#11 0x0000555e23da388e mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff188e)
#12 0x0000555e23da3d6a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff1d6a)
#13 0x0000555e23da476c mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
#14 0x0000555e23da2ec5 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff0ec5)
#15 0x0000555e23da362a mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff162a)
#16 0x0000555e23da3d6a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff1d6a)
#17 0x0000555e23da4594 mlir::PassManager::run(mlir::Operation*) (/data/bin/llvm-project/build/bin/mlir-opt+0x3ff2594)
#18 0x0000555e23d94e5b performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#19 0x0000555e23d96314 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) MlirOptMain.cpp:0:0
#20 0x0000555e23d964c4 mlir::LogicalResult llvm::function_ref<mlir::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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#21 0x0000555e23e949c4 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (/data/bin/llvm-project/build/bin/mlir-opt+0x40e29c4)
#22 0x0000555e23d8f797 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/bin/llvm-project/build/bin/mlir-opt+0x3fdd797)
#23 0x0000555e23d967eb mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/bin/llvm-project/build/bin/mlir-opt+0x3fe47eb)
#24 0x0000555e2127a27b main (/data/bin/llvm-project/build/bin/mlir-opt+0x14c827b)
#25 0x00007f1ed600f083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#26 0x0000555e21311f1e _start (/data/bin/llvm-project/build/bin/mlir-opt+0x155ff1e)
Aborted (core dumped)
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:tosa