Skip to content

Add eigensolver support for Hermitian and Symmetric#945

Merged
luraess merged 3 commits into
mainfrom
lr/herm
Jul 5, 2026
Merged

Add eigensolver support for Hermitian and Symmetric#945
luraess merged 3 commits into
mainfrom
lr/herm

Conversation

@luraess

@luraess luraess commented Jul 3, 2026

Copy link
Copy Markdown
Member

Add ROCMatrix-specific generalized eigensolver support for Hermitian and Symmetric inputs.

This makes calls like eigen(Hermitian(A_gpu), Hermitian(B_gpu)) dispatch to rocSOLVER instead of falling through to the generic LinearAlgebra path.

Changes

  • Add high-level sygvd! / hegvd! rocSOLVER wrappers.
  • Add eigen(A, B) methods for Symmetric and Hermitian ROC matrices.
  • Respect wrapper uplo, matching Base LinearAlgebra behavior.
  • Map positive solver info to LinearAlgebra.PosDefException.
  • Added the mixed real wrapper support and tests.

Testing

Added regression coverage for generalized Symmetric and Hermitian ROCMatrix eigensolver calls.

Fixes #903.

@luraess

luraess commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Note that mixed Hermitian/Symmetric support is intentionally real-only, because complex Symmetric is not a Hermitian definite problem.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AMDGPU.jl Benchmarks

Details
Benchmark suite Current: f3cab5f Previous: 790ffef Ratio
amdgpu/synchronization/context/device 640 ns 600 ns 1.07
amdgpu/synchronization/stream/blocking 270 ns 250 ns 1.08
amdgpu/synchronization/stream/nonblocking 360 ns 330 ns 1.09
array/accumulate/Float32/1d 86321 ns 85181 ns 1.01
array/accumulate/Float32/dims=1 316234 ns 346495 ns 0.91
array/accumulate/Float32/dims=1L 135832 ns 135832 ns 1
array/accumulate/Float32/dims=2 129322 ns 133722 ns 0.97
array/accumulate/Float32/dims=2L 2810031 ns 2807449 ns 1.00
array/accumulate/Int64/1d 97761 ns 97751 ns 1.00
array/accumulate/Int64/dims=1 243523 ns 327884 ns 0.74
array/accumulate/Int64/dims=1L 167762 ns 167762 ns 1
array/accumulate/Int64/dims=2 122592 ns 128652 ns 0.95
array/accumulate/Int64/dims=2L 2985303 ns 2987542 ns 1.00
array/broadcast 90451 ns 85431 ns 1.06
array/construct 1700 ns 1640 ns 1.04
array/copy 39070 ns 37090 ns 1.05
array/copyto!/cpu_to_gpu 183192 ns 119302 ns 1.54
array/copyto!/gpu_to_cpu 115372 ns 183102 ns 0.63
array/copyto!/gpu_to_gpu 60751 ns 73881 ns 0.82
array/iteration/findall/bool 180053 ns 180732 ns 1.00
array/iteration/findall/int 190923 ns 199623 ns 0.96
array/iteration/findfirst/bool 117472 ns 121852 ns 0.96
array/iteration/findfirst/int 115881 ns 114861 ns 1.01
array/iteration/findmin/1d 169572 ns 170243 ns 1.00
array/iteration/findmin/2d 153793 ns 155382 ns 0.99
array/iteration/logical 354545 ns 355195 ns 1.00
array/iteration/scalar 289114 ns 290084 ns 1.00
array/permutedims/2d 74651 ns 75151 ns 0.99
array/permutedims/3d 73881 ns 74541 ns 0.99
array/permutedims/4d 77241 ns 77212 ns 1.00
array/random/rand/Float32 51311 ns 50610 ns 1.01
array/random/rand/Int64 56261 ns 57201 ns 0.98
array/random/rand!/Float32 86801 ns 95971 ns 0.90
array/random/rand!/Int64 91372 ns 86611 ns 1.05
array/random/randn/Float32 88711 ns 99462 ns 0.89
array/random/randn!/Float32 96751 ns 108421 ns 0.89
array/reductions/mapreduce/Float32/1d 133152 ns 133292 ns 1.00
array/reductions/mapreduce/Float32/dims=1 95081 ns 95621 ns 0.99
array/reductions/mapreduce/Float32/dims=1L 774411 ns 778531 ns 0.99
array/reductions/mapreduce/Float32/dims=2 96862 ns 97572 ns 0.99
array/reductions/mapreduce/Float32/dims=2L 298724 ns 308705 ns 0.97
array/reductions/mapreduce/Int64/1d 134031 ns 134702 ns 1.00
array/reductions/mapreduce/Int64/dims=1 95001 ns 96291 ns 0.99
array/reductions/mapreduce/Int64/dims=1L 779552 ns 785001 ns 0.99
array/reductions/mapreduce/Int64/dims=2 96271 ns 96932 ns 0.99
array/reductions/mapreduce/Int64/dims=2L 300325 ns 308475 ns 0.97
array/reductions/reduce/Float32/1d 133271 ns 133372 ns 1.00
array/reductions/reduce/Float32/dims=1 94912 ns 95181 ns 1.00
array/reductions/reduce/Float32/dims=1L 775042 ns 775611 ns 1.00
array/reductions/reduce/Float32/dims=2 96642 ns 97251 ns 0.99
array/reductions/reduce/Float32/dims=2L 297444 ns 297585 ns 1.00
array/reductions/reduce/Int64/1d 133852 ns 135242 ns 0.99
array/reductions/reduce/Int64/dims=1 95081 ns 95041 ns 1.00
array/reductions/reduce/Int64/dims=1L 777551 ns 781271 ns 1.00
array/reductions/reduce/Int64/dims=2 96071 ns 96491 ns 1.00
array/reductions/reduce/Int64/dims=2L 307385 ns 302104 ns 1.02
array/reverse/1d 43201 ns 42991 ns 1.00
array/reverse/1dL 74871 ns 75381 ns 0.99
array/reverse/1dL_inplace 111402 ns 167852 ns 0.66
array/reverse/1d_inplace 141082 ns 72911 ns 1.93
array/reverse/2d 50621 ns 51030 ns 0.99
array/reverse/2dL 101831 ns 101682 ns 1.00
array/reverse/2dL_inplace 126222 ns 107362 ns 1.18
array/reverse/2d_inplace 143612 ns 85981 ns 1.67
array/sorting/1d 341685 ns 342214 ns 1.00
integration/byval/reference 38940 ns 39040 ns 1.00
integration/byval/slices=1 40101 ns 40281 ns 1.00
integration/byval/slices=2 159702 ns 146872 ns 1.09
integration/byval/slices=3 238554 ns 238173 ns 1.00
integration/volumerhs 5036353 ns 5024071 ns 1.00
kernel/indexing 129452 ns 67700 ns 1.91
kernel/indexing_checked 69131 ns 64401 ns 1.07
kernel/launch 1290 ns 1350 ns 0.96
kernel/rand 196543 ns 198943 ns 0.99
latency/import 1585085821 ns 1577477738 ns 1.00
latency/precompile 36331778672 ns 36338831604 ns 1.00
latency/ttfp 2158035653 ns 2145912756 ns 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@luraess luraess marked this pull request as ready for review July 3, 2026 18:37
@luraess luraess merged commit dcd84fa into main Jul 5, 2026
5 checks passed
@luraess luraess deleted the lr/herm branch July 5, 2026 20:14
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.

Generalized eigensolver for Hermitian matrices fails

1 participant