Matrix-vector multiplication fails when DArray is unevenly distributed
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- julia
調査の方向性
julia -p 2 で test.jl の例を再現し、その後、/src/linalg.jl:279 周辺の出力配列の構築と、/src/linalg.jl:209 周辺で失敗している検証を調べてください。第1次元の不均等なチャンクがどのように表現されているかを追跡し、2x4 および 3x4 の分割で A*x が正常に完了することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
The following example creates DArrays A and x, then attempts A*x. The only unusual bit is that A is distributed unevenly.
# test.jl
using Distributed, DistributedArrays
@everywhere using Distributed, DistributedArrays
A2 = @spawnat 2 ones((2,4)) # 2x4 array
A3 = @spawnat 3 ones((3,4)) # 3x4 array
A = DArray(reshape([A2,A3], (2,1))) # 5x4 array
x = dones((4,1)) # 4x1 array
A*x
Launching the REPL with julia -p 2 including test.jl yields
julia> include("test.jl")
ERROR: LoadError: ArgumentError: cuts of the first dimension of the output matrix must match cuts of dimension 1 of the first input matrix
Stacktrace:
[1] _matmatmul!(C::DArray{Float64, 2, Matrix{Float64}}, A::DArray{Float64, 2, Matrix{Float64}}, B::DArray{Float64, 2, Matrix{Float64}}, α::Int64, β::Int64, tA::Char)
@ DistributedArrays ~/.julia/packages/DistributedArrays/fEM6l/src/linalg.jl:209
[2] mul! (repeats 2 times)
@ ~/.julia/packages/DistributedArrays/fEM6l/src/linalg.jl:262 [inlined]
[3] *(A::DArray{Float64, 2, Matrix{Float64}}, B::DArray{Float64, 2, Matrix{Float64}})
@ DistributedArrays ~/.julia/packages/DistributedArrays/fEM6l/src/linalg.jl:279
Looking at the source around /src/linalg.jl:279,
function Base.:*(A::DMatrix, B::AbstractMatrix)
T = Base.promote_op(_matmul_op, eltype(A), eltype(B))
C = DArray(I -> Array{T}(undef, map(length, I)),
(size(A, 1), size(B, 2)),
procs(A)[:,1:min(size(procs(A), 2), size(procs(B), 2))],
(size(procs(A), 1), min(size(procs(A), 2), size(procs(B), 2))))
return mul!(C, A, B)
end
I think the issue may be that creation of the output array C doesn't account for the (admittedly unusual) possibility that A is distributed in uneven chunks.
- 主要言語
- Julia
- スター
- 205
- フォーク
- 34
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaParallel/DistributedArrays.jl のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaParallel/DistributedArrays.jl#255 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
JuliaParallel/DistributedArrays.jl#239 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
JuliaParallel/DistributedArrays.jl#238 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaParallel/DistributedArrays.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaParallel/Hwloc.jl#93 ·
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`対応中かも @devmotion が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaStats/Distributions.jl#2117 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
TomerAberbach/profiler-md#970 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
grame-cncm/faust#1409 ·
メンテナーはふだん 1 日以内に返信