`atomic_store_add` of a slice extracted from a tile adds nothing when the slice is under 256 bytes
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- julia
- 領域
- backend, testing-qa
調査の方向性
Start by reproducing the issue with the Julia kernel and size table in the report, comparing extract followed by atomic_store_add against the masked-sum workaround. The report says the emitted Tile IR looks correct and points to tileiras as a possible source, but gives no repository file or test entry point. Done means identifying the cause and ensuring atomic additions of extracted slices work across the reported sizes and element types.
索引モデルが issue の本文から書いたものです。
説明
On cuTile 1.0.0 (tileiras 13.3.36, and 13.4.92 with cuTile main), atomic_store_add of a slice that extract takes from a loaded tile leaves the destination unchanged when the slice is small. A plain store of the same slice is right, and so is atomic_store_add of the whole tile. On a GB10 (sm_121), cuTile 1.0.0 and tileiras 13.3.36:
| Slice (Float32) | store |
atomic_store_add |
|---|---|---|
| 8 × 1 (32 B) | right | CUDA_ERROR_MISALIGNED_ADDRESS |
| 16 × 1 (64 B) | right | wrong: nothing added |
| 32 × 1 (128 B) | right | wrong: nothing added |
| 64 × 1 (256 B) | right | right |
BFloat16 behaves the same by bytes: 8 and 16 rows fault, 32 and 64 rows add nothing, and 128 rows are right. With cuTile main and tileiras 13.4.92, compute-sanitizer reports the fault as "Misaligned shared or local address" inside atomic_store_add. The Tile IR that cuTile.jl emits looks right (extract %tile[1, 0] : tile<2x16xf32> -> tile<1x16xf32>, then atomic_red_view_tko ... addf), so this seems to be in tileiras.
using CUDACore, cuTile
const ct = cuTile
function k(out, g, ::Val{R}, ::Val{Atomic}) where {R, Atomic}
x = ct.load(g, (Int32(1), Int32(1)), (R, 2))
slice = ct.extract(x, (1, 2), (R, 1))
Atomic ? ct.atomic_store_add(out, (Int32(1), Int32(2)), slice) : ct.store(out, (Int32(1), Int32(2)), slice)
return
end
for R in (16, 64)
g = CuArray(rand(Float32, R, 2))
for atomic in (false, true)
out = CUDACore.zeros(Float32, R, 2)
ct.launch(k, 1, out, g, Val(R), Val(atomic))
println(atomic ? "atomic_store_add" : "store", " of column 2, R = $R: ",
Array(out)[:, 2] == Array(g)[:, 2] ? "right" : "wrong")
end
end
store of column 2, R = 16: right
atomic_store_add of column 2, R = 16: wrong
store of column 2, R = 64: right
atomic_store_add of column 2, R = 64: right
A workaround that is right at every size we tried (1 to 128 rows, Float32 and BFloat16): build the slice as a masked sum, sum(ifelse.(lane .== 2, x, 0f0); dims = 2), rather than extract.
A related observation on cuTile main, possibly by design: atomic_store_add at a tile index before the first (index 0) raises CUDA_ERROR_ILLEGAL_INSTRUCTION, while one past the last is clipped silently.
This should probably be reported upstream instead but I wanted to record it quickly before I forgot about it.
2026/11/05: Still happens on tileiras 13.5
Assisted by: Opus 5.5
- 主要言語
- Julia
- スター
- 90
- フォーク
- 13
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 19
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGPU/cuTile.jl のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliaGPU/cuTile.jl#295 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaGPU/cuTile.jl#333 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 3 日以内に返信
JuliaGPU/cuTile.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
メンテナーはふだん 3 日以内に返信
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
FluxML/Optimisers.jl#253 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
`poissonians` is not public, unlike `brownians` and `jumps`対応中かも @isaacsas が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
SciML/ModelingToolkit.jl#5389 ·
メンテナーはふだん 2 日以内に返信