| Issue |
114764
|
| Summary |
[MLIR]-convert-pdl-to-pdl-interp triggers Assertion Failure `inserted.second && "expected region to contain uniquely named symbol operations"'
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
xisang0
|
Test on commit: (https://github.com/llvm/llvm-project/commit/18f0f709345cc7e611c4f944832edb71284caacb)
step to reproduce:
```
mlir-opt test.mlir -convert-pdl-to-pdl-interp
```
test case:
```
module attributes {transform.with_named_sequence} {
pdl_interp.func @matcher(%arg0: !pdl.operation) {
pdl_interp.finalize
}
func.func @main(%arg0: tensor<2x8x9x10x3xf32> {bufferization.access = "read"}, %arg1: tensor<5x3x6x4x3xf32> {bufferization.access = "read"}, %arg2: tensor<?xf32> {bufferization.access = "read"}) {
call @conv3d_dynamic_bias(%arg0, %arg1, %arg2) {__inplace_operands_attr__ = ["true", "true", "true"]} : (tensor<2x8x9x10x3xf32>, tensor<5x3x6x4x3xf32>, tensor<?xf32>) -> ()
return
}
func.func @conv3d_dynamic_bias(%arg0: tensor<2x8x9x10x3xf32> {bufferization.access = "read"}, %arg1: tensor<5x3x6x4x3xf32> {bufferization.access = "read"}, %arg2: tensor<?xf32> {bufferization.access = "read"}) {
%0 = tosa.conv3d %arg0, %arg1, %arg2 {__inplace_operands_attr__ = ["false", "false", "false"], dilation = array<i64: 1, 1, 1>, pad = array<i64: 0, 0, 0, 0, 0, 0>, stride = array<i64: 1, 1, 1>} : (tensor<2x8x9x10x3xf32>, tensor<5x3x6x4x3xf32>, tensor<?xf32>) -> tensor<?x?x?x?x?xf32>
return
}
}
```
crash trace:
```
mlir-opt: /home/workdir/llvm-project-19/mlir/lib/IR/SymbolTable.cpp:137: mlir::SymbolTable::SymbolTable(Operation *): Assertion `inserted.second && "expected region to contain uniquely named symbol operations"' 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/test6.mlir -convert-pdl-to-pdl-interp
#0 0x00005c6e10eba098 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x1062098)
#1 0x00005c6e10eb7bbe llvm::sys::RunSignalHandlers() (./mlir-opt+0x105fbbe)
#2 0x00005c6e10ebaaa8 SignalHandler(int) Signals.cpp:0:0
#3 0x00007ed53f0e4520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007ed53f1389fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007ed53f0e4476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007ed53f0ca7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007ed53f0ca71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007ed53f0dbe96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x00005c6e14296c10 mlir::SymbolTable::SymbolTable(mlir::Operation*) (./mlir-opt+0x443ec10)
#10 0x00005c6e1429bd7c mlir::SymbolTableCollection::getSymbolTable(mlir::Operation*) (./mlir-opt+0x4443d7c)
#11 0x00005c6e1429fedc mlir::Operation* llvm::function_ref<mlir::Operation* (mlir::Operation*, mlir::StringAttr)>::callback_fn<mlir::SymbolTableCollection::lookupSymbolIn(mlir::Operation*, mlir::SymbolRefAttr, llvm::SmallVectorImpl<mlir::Operation*>&)::$_0>(long, mlir::Operation*, mlir::StringAttr) SymbolTable.cpp:0:0
#12 0x00005c6e14299120 lookupSymbolInImpl(mlir::Operation*, mlir::SymbolRefAttr, llvm::SmallVectorImpl<mlir::Operation*>&, llvm::function_ref<mlir::Operation* (mlir::Operation*, mlir::StringAttr)>) SymbolTable.cpp:0:0
#13 0x00005c6e1429c016 mlir::SymbolTableCollection::lookupNearestSymbolFrom(mlir::Operation*, mlir::SymbolRefAttr) (./mlir-opt+0x4444016)
#14 0x00005c6e1409ea31 mlir::CallGraph::resolveCallable(mlir::CallOpInterface, mlir::SymbolTableCollection&) const (./mlir-opt+0x4246a31)
#15 0x00005c6e1409e390 computeCallGraph(mlir::Operation*, mlir::CallGraph&, mlir::SymbolTableCollection&, mlir::CallGraphNode*, bool) CallGraph.cpp:0:0
#16 0x00005c6e1409e510 computeCallGraph(mlir::Operation*, mlir::CallGraph&, mlir::SymbolTableCollection&, mlir::CallGraphNode*, bool) CallGraph.cpp:0:0
#17 0x00005c6e1409e510 computeCallGraph(mlir::Operation*, mlir::CallGraph&, mlir::SymbolTableCollection&, mlir::CallGraphNode*, bool) CallGraph.cpp:0:0
#18 0x00005c6e1409e27a mlir::CallGraph::CallGraph(mlir::Operation*) (./mlir-opt+0x424627a)
#19 0x00005c6e134731b3 mlir::transform::TransformDialect::verifyOperationAttribute(mlir::Operation*, mlir::NamedAttribute) (./mlir-opt+0x361b1b3)
#20 0x00005c6e142a4a23 (anonymous namespace)::OperationVerifier::verifyOpAndDominance(mlir::Operation&) Verifier.cpp:0:0
#21 0x00005c6e142a4886 mlir::verify(mlir::Operation*, bool) (./mlir-opt+0x444c886)
#22 0x00005c6e140e3afe mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x428bafe)
#23 0x00005c6e140e3f82 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x428bf82)
#24 0x00005c6e140e672e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x428e72e)
#25 0x00005c6e140df252 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#26 0x00005c6e140deebb 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
#27 0x00005c6e14188725 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+0x4330725)
#28 0x00005c6e140da0b2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x42820b2)
#29 0x00005c6e140da363 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4282363)
#30 0x00005c6e140da572 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x4282572)
#31 0x00005c6e10e992e7 main (./mlir-opt+0x10412e7)
#32 0x00007ed53f0cbd90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#33 0x00007ed53f0cbe40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#34 0x00005c6e10e98e55 _start (./mlir-opt+0x1040e55)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs