-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:bufferizationBufferization infrastructureBufferization infrastructure
Description
Test commit: da0730b
Steps to reproduce:
mlir-opt test.mlir -one-shot-bufferize=allow-unknown-ops
Test case:
func.func @main(%arg0: tensor<*xi32>) {
%0 = tensor.cast %arg0 : tensor<*xi32> to tensor<*xi32>
return
}
Crash trace:
mlir-opt: /home/ty/llvm-project/mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp:101: mlir::LogicalResult mlir::tensor::{anonymous}::CastOpInterface::bufferize(mlir::Operation*, mlir::RewriterBase&, const mlir::bufferization::BufferizationOptions&) const: Assertion `memref::CastOp::areCastCompatible(resultBuffer->getType(), *resultMemRefType) && "CallOp::bufferize: cast incompatible"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/ty/llvm-project/build/bin/mlir-opt test.mlir -one-shot-bufferize=allow-unknown-ops
#0 0x000055fd675f9f2a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ty/llvm-project/build/bin/mlir-opt+0xd63f2a)
#1 0x000055fd675f709c SignalHandler(int) Signals.cpp:0:0
#2 0x00007f2d809a7980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f2d7f658e87 raise /build/glibc-CVJwZb/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f2d7f65a7f1 abort /build/glibc-CVJwZb/glibc-2.27/stdlib/abort.c:81:0
#5 0x00007f2d7f64a3fa __assert_fail_base /build/glibc-CVJwZb/glibc-2.27/assert/assert.c:89:0
#6 0x00007f2d7f64a472 (/lib/x86_64-linux-gnu/libc.so.6+0x30472)
#7 0x000055fd68972646 mlir::bufferization::detail::BufferizableOpInterfaceInterfaceTraits::FallbackModel<mlir::tensor::(anonymous namespace)::CastOpInterface>::bufferize(mlir::bufferization::detail::BufferizableOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::RewriterBase&, mlir::bufferization::BufferizationOptions const&) BufferizableOpInterfaceImpl.cpp:0:0
#8 0x000055fd6796a862 mlir::bufferization::bufferizeOp(mlir::Operation*, mlir::bufferization::BufferizationOptions const&, bool, mlir::bufferization::OpFilter const*, mlir::bufferization::BufferizationStatistics*) (/home/ty/llvm-project/build/bin/mlir-opt+0x10d4862)
#9 0x000055fd679693a4 (anonymous namespace)::OneShotBufferizePass::runOnOperation() Bufferize.cpp:0:0
#10 0x000055fd694a43ce mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/ty/llvm-project/build/bin/mlir-opt+0x2c0e3ce)
#11 0x000055fd694a5223 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (.constprop.510) Pass.cpp:0:0
#12 0x000055fd694a58ad mlir::PassManager::run(mlir::Operation*) (/home/ty/llvm-project/build/bin/mlir-opt+0x2c0f8ad)
#13 0x000055fd694977b0 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#14 0x000055fd69497f55 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
#15 0x000055fd69498111 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
#16 0x000055fd69578290 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) (/home/ty/llvm-project/build/bin/mlir-opt+0x2ce2290)
#17 0x000055fd694936f9 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/ty/llvm-project/build/bin/mlir-opt+0x2bfd6f9)
#18 0x000055fd6949843a mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/ty/llvm-project/build/bin/mlir-opt+0x2c0243a)
#19 0x000055fd675bc9cd main (/home/ty/llvm-project/build/bin/mlir-opt+0xd269cd)
#20 0x00007f2d7f63bc87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x000055fd675cf66a _start (/home/ty/llvm-project/build/bin/mlir-opt+0xd3966a)
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:bufferizationBufferization infrastructureBufferization infrastructure