Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#718 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@maleadt đang làm issue này rồi.

Từ ngày 21/10/2026.

  • #727 của @maleadt — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
julia
Lĩnh vực
backend, databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Julia
Star
218
Fork
36
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaGPU/oneAPI.jl

Tất cả issue của JuliaGPU/oneAPI.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.