Skip to content

oneMKL: eigen and eigvals of Symmetric and Hermitian matrices - #776

Merged
maleadt merged 1 commit into
JuliaGPU:mainfrom
JorgeG94:eigen-symmetric
Dec 3, 2026
Merged

maleadt merged 1 commit into
JuliaGPU:mainfrom
JorgeG94:eigen-symmetric

Conversation

@JorgeG94

@JorgeG94 JorgeG94 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The stdlib's default driver for these is LAPACK.syevr!, which has no oneMKL method, so eigen(Symmetric(A)) of a oneMatrix reached the host method and stopped on scalar indexing. eigen! and eigvals! now call the syevd/heevd wrappers for Float32, Float64 and their complex types, and apply sortby on the device.

The range variants (eigvals(A, 1:k), eigvals(A, vl, vu)) still take the host path; they would need a syevx wrapper.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.97%. Comparing base (592513a) to head (8f8c39d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
- Coverage   86.71%   85.97%   -0.75%     
==========================================
  Files          55       55              
  Lines        5143     5091      -52     
==========================================
- Hits         4460     4377      -83     
- Misses        683      714      +31     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt force-pushed the eigen-symmetric branch 2 times, most recently from a44b2b2 to 2e77a9b Compare December 2, 2026 16:48

@maleadt maleadt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I pushed a small change: eigen(...; sortby=f) now sorts on the device (the stdlib's sorteig! permuted element by element), and the test checks that only the uplo triangle is read. LGTM.

The stdlib's default driver for these is LAPACK.syevr!, which has no oneMKL
method, so eigen(Symmetric(A)) of a oneMatrix reached the host method and
stopped on scalar indexing. eigen! and eigvals! now call the syevd/heevd
wrappers for Float32, Float64 and their complex types, and sort by `sortby`
on the device.
@maleadt
maleadt merged commit 5ad122a into JuliaGPU:main Dec 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants