Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Products with a Symmetric/Hermitian oneMKL sparse matrix ignore the wrapper

オープン
#718 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

JuliaGPU/oneAPI.jl のほかの issue

JuliaGPU/oneAPI.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

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

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