Some reshapes of subarrays are strided, but `StrideIndex` fails.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- julia
- 領域
- performance
調査の方向性
2つの Julia の例を再現し、その後、StrideIndex が失敗する src/array_index.jl の 197-203 行付近を調べてください。dense_dims(view(A,ix,:,:)) と、折りたたまれた次元の処理を追跡してください。両方の StrideIndex 呼び出しが機能し、dense_dims が説明どおりに (static(false), static(false)) を報告すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
julia> ix = 2;
julia> A = rand(7, 5, 6);
julia> src = view(view(A,ix, :, :),:);
julia> ArrayInterface.StrideIndex(src)
ERROR: TypeError: in typeassert, expected Tuple{Int64}, got a value of type Nothing
Stacktrace:
[1] (ArrayInterface.StrideIndex{1, nothing, nothing})(s::Tuple{StaticInt{1}}, o::Tuple{StaticInt{1}})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:197
[2] (ArrayInterface.StrideIndex{1, nothing, nothing})(a::SubArray{Float64, 1, Base.ReshapedArray{Float64, 1, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}, Tuple{}}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:200
[3] ArrayInterface.StrideIndex(a::SubArray{Float64, 1, Base.ReshapedArray{Float64, 1, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}, Tuple{}}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:203
[4] top-level scope
@ REPL[25]:1
julia> ArrayInterface.StrideIndex(vec(view(A,ix,:,:)))
ERROR: TypeError: in typeassert, expected Tuple{Int64}, got a value of type Nothing
Stacktrace:
[1] (ArrayInterface.StrideIndex{1, nothing, nothing})(s::Tuple{StaticInt{1}}, o::Tuple{StaticInt{1}})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:197
[2] (ArrayInterface.StrideIndex{1, nothing, nothing})(a::Base.ReshapedArray{Float64, 1, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}, Tuple{}})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:200
[3] ArrayInterface.StrideIndex(a::Base.ReshapedArray{Float64, 1, SubArray{Float64, 2, Array{Float64, 3}, Tuple{Int64, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}}, true}, Tuple{}})
@ ArrayInterface ~/.julia/dev/ArrayInterface/src/array_index.jl:203
[4] top-level scope
@ REPL[26]:1
Basically, if collapsed dims are dense with respect to one another, collapsing them presevers strided-ness.
We should also redefine dense dims as necessary to be a statement only about that dim.
julia> ArrayInterface.dense_dims(view(A,ix,:,:))
(static(false), static(false))
So that the first dim is not dense, but the second one still is w/ respect to the first.
- 主要言語
- Julia
- スター
- 14
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaArrays/StaticArrayInterface.jl のほかの issue
-
tagbot-manual
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
Storage Orderオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaArrays/StaticArrayInterface.jl#4 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
JuliaArrays/StaticArrayInterface.jl#3 · コメント 10 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
JuliaArrays/StaticArrayInterface.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
JuliaSymbolics/SymbolicUtils.jl#1131 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信