| Issue |
61528
|
| Summary |
[MLIR] Crashed at `TestAffineLoopParametricTiling`: Assertion `funcOp.getNumArguments() >= band.size() && "Too few tile sizes" failed
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
BealZephyr
|
Test on commit: https://github.com/llvm/llvm-project/commit/333ae0a6c4d2209e3b8c6c672986a52644bd5baf
steps to reproduce:
```
mlir-opt -test-affine-parametric-tile test.mlir
```
test case:
```
#map = affine_map<(d0) -> (d0)>
#map1 = affine_map<(d0) -> (d0 + 32)>
#map2 = affine_map<(d0) -> (d0 + 17)>
#map3 = affine_map<(d0) -> (d0 + 32, 85)>
#set = affine_set<(d0) : (-d0 + 53 >= 0)>
module {
llvm.func @malloc(i64) -> !llvm.ptr<i8>
func.func @main(%29:memref<85x17xi1>) {
%6 = llvm.mlir.constant(false) : i1
affine.for %arg5 = 0 to 85 step 32 {
affine.for %arg6 = 0 to 17 step 32 {
affine.if #set(%arg5) {
affine.for %arg7 = #map(%arg5) to #map1(%arg5) {
affine.for %arg8 = #map(%arg6) to #map2(%arg6) {
affine.store %6, %29[%arg7, %arg8] : memref<85x17xi1>
}
}
} else {
affine.for %arg7 = #map(%arg5) to min #map3(%arg5) {
affine.for %arg8 = #map(%arg6) to #map2(%arg6) {
affine.store %6, %29[%arg7, %arg8] : memref<85x17xi1>
}
}
}
}
}
return
}
}
```
backtrace:
```
mlir-opt: /home/ty/llvm-project/mlir/test/lib/Dialect/Affine/TestAffineLoopParametricTiling.cpp:45: void checkIfTilingParametersExist(llvm::ArrayRef<mlir::AffineForOp>): Assertion `funcOp.getNumArguments() >= band.size() && "Too few tile sizes"' 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-affine-parametric-tile test.mlir
#0 0x0000560cf94c84ea llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ty/llvm-project/build/bin/mlir-opt+0x2244ea)
#1 0x0000560cf94c577c SignalHandler(int) Signals.cpp:0:0
#2 0x00007f6b55164980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
#3 0x00007f6b5425ce87 raise /build/glibc-CVJwZb/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#4 0x00007f6b5425e7f1 abort /build/glibc-CVJwZb/glibc-2.27/stdlib/abort.c:81:0
#5 0x00007f6b5424e3fa __assert_fail_base /build/glibc-CVJwZb/glibc-2.27/assert/assert.c:89:0
#6 0x00007f6b5424e472 (/lib/x86_64-linux-gnu/libc.so.6+0x30472)
#7 0x0000560cfa9d4abb (anonymous namespace)::TestAffineLoopParametricTiling::runOnOperation() TestAffineLoopParametricTiling.cpp:0:0
#8 0x0000560cfad90fe9 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aecfe9)
#9 0x0000560cfad9130a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aed30a)
#10 0x0000560cfad91688 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::'lambda'(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&)::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const Pass.cpp:0:0
#11 0x0000560cfad907c5 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aec7c5)
#12 0x0000560cfad90f5a mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aecf5a)
#13 0x0000560cfad91e43 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (.constprop.495) Pass.cpp:0:0
#14 0x0000560cfad9252d mlir::PassManager::run(mlir::Operation*) (/home/ty/llvm-project/build/bin/mlir-opt+0x1aee52d)
#15 0x0000560cfad85453 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#16 0x0000560cfad85b89 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
#17 0x0000560cfad85eb1 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
#18 0x0000560cfae50ce0 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+0x1bacce0)
#19 0x0000560cfad82b93 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+0x1adeb93)
#20 0x0000560cfad862a6 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) (/home/ty/llvm-project/build/bin/mlir-opt+0x1ae22a6)
#21 0x0000560cf9494650 main (/home/ty/llvm-project/build/bin/mlir-opt+0x1f0650)
#22 0x00007f6b5423fc87 __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344:0
#23 0x0000560cf94a74aa _start (/home/ty/llvm-project/build/bin/mlir-opt+0x2034aa)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs