Issue 114730
Summary static ConcreteT mlir::detail::StorageUserBase<mlir::MemRefType, mlir::BaseMemRefType, mlir::detail::MemRefTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::MemRefType, BaseT = mlir::BaseMemRefType, StorageT = mlir::detail::MemRefTypeStorage, UniquerT = mlir::detail::TypeUniquer, Traits = <mlir::ShapedType::Trait>, Args = <llvm::ArrayRef<long> &, mlir::Type &, mlir::MemRefLayoutAttrInterface &, mlir::Attribute &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
Labels mlir
Assignees
Reporter xisang0
    Test on commit:https://github.com/llvm/llvm-project/commit/efd8938d575d1f8058bfe220e4c672d969c82be0
steps to reproduce:
```
mlir-opt test.mlir --one-shot-bufferize="bufferize-function-boundaries=1 no-analysis-func-filter=contains_to_memref_op"
```
test case:
```
module {
  func.func @main(%arg4: tensor<513x!quant.uniform<i16:f32, 1.000000e+00>>) {
    return
 }
}
```
crash trace:
```
<unknown>:0: error: invalid memref element type
mlir-opt: /home/workdir/llvm-project-19/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::MemRefType, mlir::BaseMemRefType, mlir::detail::MemRefTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::MemRefType, BaseT = mlir::BaseMemRefType, StorageT = mlir::detail::MemRefTypeStorage, UniquerT = mlir::detail::TypeUniquer, Traits = <mlir::ShapedType::Trait>, Args = <llvm::ArrayRef<long> &, mlir::Type &, mlir::MemRefLayoutAttrInterface &, mlir::Attribute &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' 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 /home/workdir/test2.mlir "--one-shot-bufferize=bufferize-function-boundaries=1 no-analysis-func-filter=contains_to_memref_op"
 #0 0x00005ba3fd6dd998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x105e998)
 #1 0x00005ba3fd6db4be llvm::sys::RunSignalHandlers() (./mlir-opt+0x105c4be)
 #2 0x00005ba3fd6de3a8 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007c2e90831520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007c2e908859fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007c2e90831476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007c2e908177f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007c2e9081771b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007c2e90828e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00005ba400a2dbb7 (./mlir-opt+0x43aebb7)
#10 0x00005ba400a2dabc mlir::MemRefType::get(llvm::ArrayRef<long>, mlir::Type, mlir::MemRefLayoutAttrInterface, mlir::Attribute) (./mlir-opt+0x43aeabc)
#11 0x00005ba3fdbc7d7d mlir::bufferization::getMemRefTypeWithFullyDynamicLayout(mlir::TensorType, mlir::Attribute) (./mlir-opt+0x1548d7d)
#12 0x00005ba3fdc372c9 mlir::bufferization::func_ext::getBufferizedFunctionArgType(mlir::func::FuncOp, long, mlir::bufferization::BufferizationOptions const&) FuncBufferizableOpInterfaceImpl.cpp:0:0
#13 0x00005ba3fdc367be mlir::bufferization::func_ext::FuncOpInterface::bufferize(mlir::Operation*, mlir::RewriterBase&, mlir::bufferization::BufferizationOptions const&) const (./mlir-opt+0x15b77be)
#14 0x00005ba3fdc119d0 mlir::bufferization::bufferizeOp(mlir::Operation*, mlir::bufferization::BufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15929d0)
#15 0x00005ba3fdc4d232 mlir::bufferization::bufferizeModuleOp(mlir::ModuleOp, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15ce232)
#16 0x00005ba3fdc4db3d mlir::bufferization::runOneShotModuleBufferize(mlir::ModuleOp, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15ceb3d)
#17 0x00005ba3fdc1630f (anonymous namespace)::OneShotBufferizePass::runOnOperation() Bufferize.cpp:0:0
#18 0x00005ba4009028bf mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x42838bf)
#19 0x00005ba4009030a2 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x42840a2)
#20 0x00005ba40090584e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x428684e)
#21 0x00005ba4008fe372 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#22 0x00005ba4008fdfdb 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 0x00005ba4009a79b5 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) (./mlir-opt+0x43289b5)
#24 0x00005ba4008f91d2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x427a1d2)
#25 0x00005ba4008f9483 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a483)
#26 0x00005ba4008f9692 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a692)
#27 0x00005ba3fd6bcb77 main (./mlir-opt+0x103db77)
#28 0x00007c2e90818d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#29 0x00007c2e90818e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#30 0x00005ba3fd6bc6f5 _start (./mlir-opt+0x103d6f5)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to