JuliaSIMD / JuliaSIMD/LoopVectorization.jl

"Reduction not found." error with `ifelse`

オープン
#243 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
789
フォーク
73
PR マージ指標
30日以内にマージされた PR はありません

説明

```julia
julia> using LoopVectorization

julia> m = [1,2,3,4,5,6,7,8]
8-element Array{Int64,1}:
1
2
3
4
5
6
7
8

julia> s = -Inf
-Inf

julia> @avx for i in eachindex(m)
s = ifelse(m[i]>=s, m[i], s)
end
ERROR: LoadError: "Reduction not found."
Stacktrace:
[1] reduction_zero at C:\Users\89639\.julia\packages\LoopVectorization\O8WW6\src\modeling\costs.jl:469 [inlined]
[2] add_reduction_update_parent!(::Array{LoopVectorization.Operation,1}, ::Array{Symbol,1}, ::Array{Symbol,1}, ::LoopVectorization.LoopSet, ::LoopVectorization.Operation, ::LoopVectorization.Instruction, ::Int64, ::Int64) at C:\Users\89639\.julia\packages\LoopVectorization\O8WW6\src\parse\add_compute.jl:188
in expression starting at REPL[4]:1
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

LoopVectorization を使用して Julia REPL の例を再現し、src/modeling/costs.jl と src/parse/add_compute.jl のスタックトレースの位置を調査する。特に reduction_zero と add_reduction_update_parent! を確認する。@avx ループで ifelse を使用しても "Reduction not found." が発生しなくなり、その動作が適切なリグレッションテストでカバーされていれば完了とする。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
julia
領域
performance, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。