assertion failure at mlir::triton::ColumnAction::apply in triton/lib/Tools/LinearLayout.cpp
bug
### Describe the bug
The following ttgir
```ttgir
#blocked = #ttg.blocked<{sizePerThread = [4], threadsPerWarp = [32], warpsPerCTA = [4], order = [0]}>
module attributes {"ttg.num-ctas" = 1 : i32, "ttg.num-warps" = 4 : i32, ttg.target = "cuda:75", "ttg.threads-per-warp" = 32 : i32} {
tt.func public @change_value(%X: !tt.ptr<f32> {tt.divisibility = 16 : i32}) attributes {noinline = false} {
%c2_i32 = arith.constant 2 : i32
%cst = arith.constant dense<0.000000e+00> : tensor<2xf32, #blocked>
%cst_0 = arith.constant dense<2.000000e+00> : tensor<2xf32, #blocked>
%pid = tt.get_program_id x : i32
%block_start = arith.muli %pid, %c2_i32 : i32
%offsets = tt.make_range {end = 2 : i32, start = 0 : i32} : tensor<2xi32, #blocked>
%offsets_1 = tt.splat %block_start : i32 -> tensor<2xi32, #blocked>
%offsets_2 = arith.addi %offsets_1, %offsets : tensor<2xi32, #blocked>
%0 = tt.splat %X : !tt.ptr<f32> -> tensor<2x!tt.ptr<f32>, #blocked>
%1 = tt.addptr %0, %offsets_2 : tensor<2x!tt.ptr<f32>, #blocked>, tensor<2xi32, #blocked>
%2 = tt.atomic_cas acquire, gpu, %1, %cst, %cst_0 : (tensor<2x!tt.ptr<f32>, #blocked>, tensor<2xf32, #blocked>, tensor<2xf32, #blocked>) -> tensor<2xf32, #blocked>
tt.return
}
}
```
output:
```
root@d306a6352cb4:~# /workspace/triton/build/cmake.linux-x86_64-cpython-3.10/bin/triton-opt ./test.ttgir -convert-triton-gpu-to-llvm
triton-opt: /workspace/triton/lib/Tools/LinearLayout.cpp:1331: llvm::SmallVector<mlir::Value> mlir::triton::ColumnAction::apply(mlir::ValueRange) const: Assertion `values.size() == (1 << inSizeLog2) && "Values have a different size than the ColumnAction"' failed.
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: /workspace/triton/build/cmake.linux-x86_64-cpython-3.10/bin/triton-opt ./test.ttgir -convert-triton-gpu-to-llvm
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 triton-opt 0x000055e5a1459de7
1 triton-opt 0x000055e5a1456dce
2 triton-opt 0x000055e5a145acd5
3 libc.so.6 0x00007f55e0ab7520
4 libc.so.6 0x00007f55e0b0b9fc pthread_kill + 300
5 libc.so.6 0x00007f55e0ab7476 raise + 22
6 libc.so.6 0x00007f55e0a9d7f3 abort + 211
7 libc.so.6 0x00007f55e0a9d71b
8 libc.so.6 0x00007f55e0aaee96
9 triton-opt 0x000055e59961cf64
10 triton-opt 0x000055e5997fcb25
11 triton-opt 0x000055e5997fdffd
12 triton-opt 0x000055e599b397f6
13 triton-opt 0x000055e599b47cb5
14 triton-opt 0x000055e599b47e1f
15 triton-opt 0x000055e5a0786b54
16 triton-opt 0x000055e5a07e2382
17 triton-opt 0x000055e5a07dea54
18 triton-opt 0x000055e5a0788a09
19 triton-opt 0x000055e5a07881c5
20 triton-opt 0x000055e5a07895be
21 triton-opt 0x000055e5a0798858
22 triton-opt 0x000055e5a078f035
23 triton-opt 0x000055e5a078f10b
24 triton-opt 0x000055e599b57679
25 triton-opt 0x000055e599e75e3b
26 triton-opt 0x000055e599e76a39
27 triton-opt 0x000055e599e7dba2
28 triton-opt 0x000055e599e7d3c2
29 triton-opt 0x000055e599e67507
30 triton-opt 0x000055e599e6679e
31 triton-opt 0x000055e5a107c778
32 triton-opt 0x000055e599e5c632
33 triton-opt 0x000055e599e5ca2c
34 triton-opt 0x000055e599e5cc6d
35 triton-opt 0x000055e599359283
36 libc.so.6 0x00007f55e0a9ed90
37 libc.so.6 0x00007f55e0a9ee40 __libc_start_main + 128
38 triton-opt 0x000055e5993ddef5
Aborted (core dumped)
```
To reproduce:
```
triton-opt ./test.ttgir -convert-triton-gpu-to-llvm
```
### Environment details
Triton: main @ https://github.com/triton-lang/triton/commit/e3fe871f2f709d1f48344fbc06974877afbf7416 (2026-07-14), triton.version == 3.8.0
GPU: CUDA, compute capability 7.5 (Turing)
关闭于 2026-07-17 1 条评论