Skip to content

Create the eigensolver start vector on the device of the matrix - #722

Merged
CarloLucibello merged 2 commits into
masterfrom
fix-amdgpu-eigmax
Nov 1, 2026
Merged

CarloLucibello merged 2 commits into
masterfrom
fix-amdgpu-eigmax

Conversation

@simsurace

Copy link
Copy Markdown
Member

This solves a bug which has been failing AMDGPU CI for a few months.

scaled_laplacian estimates the largest eigenvalue with KrylovKit, starting
from a random vector that was always created on the CPU. For a GPU graph,
Symmetric(A) * x0 then went to CPU BLAS with a GPU matrix. CUDA avoided this
with its own method in the extension, but on AMDGPU OpenBLAS read GPU memory
and the process crashed with a segmentation fault, which is why the GNNGraphs
AMDGPU job has failed in every build since at least August.

The start vector is now allocated with similar, so it lives where the matrix
does on any backend. Sparse matrices keep a dense CPU vector, since similar
would give a sparse one.
@CarloLucibello

Copy link
Copy Markdown
Member

Nice!

@CarloLucibello
CarloLucibello merged commit 0970953 into master Nov 1, 2026
10 of 12 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