Products with a Symmetric/Hermitian oneMKL sparse matrix ignore the wrapper
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
調査の方向性
Start in lib/mkl/interfaces.jl and trace how the Symmetric and Hermitian flags are converted before the oneMKL sparse multiplication call. Compare the behavior with the linked CUDA.jl fix and add a regression test based on the issue’s example, checking both wrappers against Julia’s Symmetric(A) * x or Hermitian(A) * x; done means the wrapper’s selected triangle is respected.
索引モデルが issue の本文から書いたものです。
説明
Multiplying by a Symmetric or Hermitian wrapper of a oneMKL sparse matrix most likely ignores the wrapper and computes the product with the stored matrix, e.g. Symmetric(dA) * x returns dA * x.
LinearAlgebra's storage-level mul!(C, tA, A, B, α, β) passes a Symmetric/Hermitian operand as its parent plus 'S'/'s'/'H'/'h'. The methods in lib/mkl/interfaces.jl turn that into 'N' (tA = tA in ('S', 's', 'H', 'h') ? 'N' : tA), so the triangle the wrapper refers to is treated as the whole matrix.
I haven't run this on Intel hardware. The code is the same as in CUDA.jl and AMDGPU.jl, where it gives wrong results (JuliaGPU/CUDA.jl#2572, JuliaGPU/AMDGPU.jl#1168). A test along these lines should show it:
using oneAPI, oneAPI.oneMKL, SparseArrays, LinearAlgebra
A = sprand(Float32, 10, 10, 0.4); x = rand(Float32, 10)
dA = oneSparseMatrixCSR(A)
Array(Symmetric(dA) * oneArray(x)) ≈ Symmetric(A) * x # expected true
The CUDA.jl fix (https://github.com/JuliaGPU/CUDA.jl/pull/3417) materializes the full matrix (sparse(::HermOrSym) for sparse parents, copytri! for dense ones) before calling the vendor library.
- 主要言語
- Julia
- スター
- 217
- フォーク
- 37
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 50
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGPU/oneAPI.jl のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
performance
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Collecting a context together with its memory segfaults対応中かも @maleadt が 1 日前に担当しました。 オープンruntime
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
libraries upstream
難易度 4/5 1〜2日 初心者へのやさしさ 22/100
JuliaGPU/oneAPI.jl#703 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaGPU/oneAPI.jl#663 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
JuliaGPU/oneAPI.jl の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
JuliaPy/pyjuliapkg#102 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
JuliaMath/Polynomials.jl#641 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
JuliaLang/LinearAlgebra.jl#1794 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信