Skip to content

Add CuDSSSolver for GPU-resident SPD sparse solves#14

Draft
vboussange with Copilot wants to merge 4 commits into
mainfrom
copilot/add-cudss-linear-solver
Draft

Add CuDSSSolver for GPU-resident SPD sparse solves#14
vboussange with Copilot wants to merge 4 commits into
mainfrom
copilot/add-cudss-linear-solver

Conversation

Copilot AI commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

This adds cuDSS-backed sparse linear solves to JAXScape via spineax. The new solver is exposed alongside the existing custom solvers and plugs into lineax, so it follows the same differentiated solve path as the current solver integrations.

  • New solver

    • Add jaxscape.solvers.CuDSSSolver
    • Implement it as a lineax.AbstractLinearSolver
    • Use spineax.cudss.solver.solve in symmetric-positive-definite mode for Laplacian-based systems
    • Support GPU device selection via device_id
  • Lineax integration

    • Reuse the existing BCOOLinearOperator / lineax.linear_solve flow
    • Preserve compatibility with Lineax’s custom VJP behavior rather than introducing a separate solve path
    • Handle sparse BCOO inputs by converting to BCSR before dispatching to cuDSS
  • API surface

    • Export CuDSSSolver from jaxscape.solvers
    • Update solver-facing docs to include the new backend and its installation model
  • Docs

    • Document cuDSS as a third optional sparse solver
    • Clarify that cuDSS installation is handled through spineax and depends on the CUDA environment
  • Targeted coverage

    • Add tests for missing-backend error handling
    • Add mocked-backend coverage for solve, batched solve, and differentiation through the lineax path

Example:

from jaxscape import ResistanceDistance
from jaxscape.solvers import CuDSSSolver

solver = CuDSSSolver(device_id=0)
distance = ResistanceDistance(solver=solver)

Copilot AI linked an issue Apr 17, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 17, 2026 08:22
Agent-Logs-Url: https://github.com/vboussange/jaxscape/sessions/8e218cde-5b79-4d07-ac89-74310467f289

Co-authored-by: vboussange <28376122+vboussange@users.noreply.github.com>
Agent-Logs-Url: https://github.com/vboussange/jaxscape/sessions/8e218cde-5b79-4d07-ac89-74310467f289

Co-authored-by: vboussange <28376122+vboussange@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new linear solver cudss to JAXScape Add CuDSSSolver for GPU-resident SPD sparse solves Apr 17, 2026
Copilot AI requested a review from vboussange April 17, 2026 08:34

@vboussange vboussange left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot Thanks for the PR. Please update the CI/CD .yaml so that spineax is installed before running the tests, so that we can automatically test the implemented solver. Make sure that a GPU is requested for running the job.

Agent-Logs-Url: https://github.com/vboussange/jaxscape/sessions/e7bc2807-dc0e-45a9-a7a3-ab85ca458ef1

Co-authored-by: vboussange <28376122+vboussange@users.noreply.github.com>

Copilot AI commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Thanks for the PR. Please update the CI/CD .yaml so that spineax is installed before running the tests, so that we can automatically test the implemented solver. Make sure that a GPU is reque...

Updated in 3a61aa0. The test workflow now runs the CuDSS-specific tests explicitly (tests/test_linear_solve.py -k cudss) before the rest of the suite, and I clarified the CI coverage note in the solver docs.

Copilot AI requested a review from vboussange April 17, 2026 12:10
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.

Add new linear solver cudss

2 participants