| Issue |
177948
|
| Summary |
mlir-opt crash on sparse_tensor.new during --eliminate-empty-tensors pass
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Subway2023
|
# Description
mlir-opt version: 22.1.0-rc1
mlir-opt crashes when running the --eliminate-empty-tensors pass on IR containing a sparse_tensor.new operation.
# Reproduce
location: If the **sparse_tensor.new** is commented out, the crash no longer occurs.
```
module {
func.func @main() {
%0 = gpu.dynamic_shared_memory : memref<?xi8, #gpu.address_space<workgroup>>
%1 = gpu.grid_dim x
%2 = ml_program.token
%3 = tensor.from_elements %1 : tensor<1xindex>
%4 = tensor.collapse_shape %3 [] : tensor<1xindex> into tensor<index>
%5 = pdl_interp.create_attribute 42 : i32
%6 = sparse_tensor.new %4 : tensor<index> to tensor<1xindex, #sparse_tensor.encoding<{ map = (d0) -> (d0 : compressed) }>>
return
}
}
```
```
mlir-opt --eliminate-empty-tensors test.mlir
```
```
bufferizesToMemoryRead not implemented
UNREACHABLE executed at /mnt/sdd1/sbw/mlir/tool/llvm-project-llvmorg-22.1.0-rc1/build/tools/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc:1166!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt --eliminate-empty-tensors /mnt/sdd1/sbw/mlir/data/genProgram_0125_filtered/genProgram_0125_valid/260044_0a44_7.mlir
#0 0x000060706b8b6e32 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x252fe32)
#1 0x000060706b8b35af llvm::sys::RunSignalHandlers() (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x252c5af)
#2 0x000060706b8b36fc SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f24eec45330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
#4 0x00007f24eec9eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x00007f24eec9eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x00007f24eec9eb2c pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x00007f24eec4527e raise ./signal/../sysdeps/posix/raise.c:27:6
#8 0x00007f24eec288ff abort ./stdlib/abort.c:81:7
#9 0x000060706b89612e (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x250f12e)
#10 0x000060706c4ee262 (/mnt/sdd1/sbw/mlir/tool/llvmorg-22.1.0-install/bin/mlir-opt+0x3167262)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs