| Issue |
60725
|
| Summary |
[mlir] Linalg-Generalize-Named-Op Pass violates Assertion "incorrect # of replacement values"
|
| Labels |
|
| Assignees |
|
| Reporter |
Colloportus0
|
MLIR built at commit https://github.com/llvm/llvm-project/commit/4b815d84
Reproduced with:
`mlir-opt --linalg-generalize-named-ops temp.mlir`
temp.mlir:
``` milr
module {
func.func private @func1( ) {
%0 = tensor.empty() : tensor<3x13xf32>
%alloc_1161 = memref.alloc() : memref<14xi32>
%20 = tensor.empty() : tensor<i32>
%21 = linalg.dot ins(%alloc_1161, %alloc_1161 : memref<14xi32>, memref<14xi32>) outs(%20 : tensor<i32>) -> tensor<i32>
bufferization.dealloc_tensor %21 : tensor<i32>
return
}
}
```
trace:
```console
Assertion failed: (op->getNumResults() == newValues.size() && "incorrect # of replacement values"), function replaceOp, file PatternMatch.cpp, line 266.
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 --linalg-generalize-named-ops temp.mlir
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 mlir-opt 0x0000000104a66650 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 mlir-opt 0x0000000104a656b8 llvm::sys::RunSignalHandlers() + 112
2 mlir-opt 0x0000000104a66ce8 SignalHandler(int) + 344
3 libsystem_platform.dylib 0x00000001b36554c4 _sigtramp + 56
4 libsystem_pthread.dylib 0x00000001b363dee0 pthread_kill + 288
5 libsystem_c.dylib 0x00000001b3578340 abort + 168
6 libsystem_c.dylib 0x00000001b3577754 err + 0
7 mlir-opt 0x00000001068cfd34 mlir::RewriterBase::eraseOp(mlir::Operation*) (.cold.1) + 0
8 mlir-opt 0x0000000106268f1c mlir::RewriterBase::eraseOp(mlir::Operation*) + 0
9 mlir-opt 0x000000010509f184 mlir::linalg::generalizeNamedOp(mlir::RewriterBase&, mlir::linalg::LinalgOp) + 840
10 mlir-opt 0x000000010509fa6c mlir::linalg::LinalgGeneralizationPattern::matchAndRewrite(mlir::linalg::LinalgOp, mlir::PatternRewriter&) const + 16
11 mlir-opt 0x00000001063efaf0 mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) + 1420
12 mlir-opt 0x000000010619e3d8 (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() + 2432
13 mlir-opt 0x000000010619ba30 mlir::applyPatternsAndFoldGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig) + 1516
14 mlir-opt 0x000000010509fcac (anonymous namespace)::LinalgGeneralizationPass::runOnOperation() + 296
15 mlir-opt 0x000000010614d28c mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 428
16 mlir-opt 0x000000010614d7bc mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
17 mlir-opt 0x0000000106151824 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const + 176
18 mlir-opt 0x00000001061516a0 mlir::LogicalResult mlir::failableParallelForEach<std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&) + 360
19 mlir-opt 0x000000010614e484 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) + 1396
20 mlir-opt 0x000000010614d3bc mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 732
21 mlir-opt 0x000000010614d7bc mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
22 mlir-opt 0x000000010614f12c mlir::PassManager::run(mlir::Operation*) + 1148
23 mlir-opt 0x00000001061484fc performActions(llvm::raw_ostream&, bool, bool, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, bool, bool) + 476
24 mlir-opt 0x00000001061480e8 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) + 704
25 mlir-opt 0x00000001061b2708 mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) + 656
26 mlir-opt 0x0000000106146510 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool) + 216
27 mlir-opt 0x0000000106146a04 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) + 1208
28 mlir-opt 0x0000000104905e70 main + 108
29 dyld 0x0000000109cd9088 start + 516
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs