Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#718 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #727 di @maleadt — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
julia
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Julia
Stelle
218
Fork
36
Merge medio
1g 4h
PR unite (30g)
55

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JuliaGPU/oneAPI.jl

Tutte le issue di JuliaGPU/oneAPI.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.