Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SparseArrays an extension package #955

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ChrisRackauckas
Copy link
Contributor

While this may seem a bit weird since the most normal case for Krylov subspace methods is on sparse arrays, there are multiple reasons for this.

  1. SparseArrays pulls in SuiteSparse and thus GPL dependencies
  2. This is by far the biggest part of the load. Normal Krylov.jl loads in about 8ms, but the SparseArrays part is ~150ms. So if you want to just work on operators, then you'd taking a decently sized hit.
  3. This is required for downstream dependency reduction Make SparseArrays an extension SciML/LinearSolve.jl#570

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 98.17881% with 11 lines in your changes missing coverage. Please review.

Project coverage is 93.38%. Comparing base (9536ef7) to head (b0af1c4).
Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
src/krylov_processes.jl 0.00% 8 Missing ⚠️
ext/KrylovSparseArraysExt.jl 66.66% 2 Missing ⚠️
ext/block_krylov_processes.jl 99.68% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
- Coverage   94.68%   93.38%   -1.30%     
==========================================
  Files          45       50       +5     
  Lines        8027     9175    +1148     
==========================================
+ Hits         7600     8568     +968     
- Misses        427      607     +180     

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

@amontoison
Copy link
Member

Is not LinearAlgebra the biggest part of the load?
It's fine for me to do an extension, I just want to be sure to document the need of doing using SparseArrays if the users want to call a Krylov process or a block-Krylov process.
We also want to update the compat entry on Julia (1.6 --> 1.10).

I can take care of that next week and do a new release.

@ChrisRackauckas
Copy link
Contributor Author

LinearAlgebra.jl is a big one, that one will take a bit more time. The goal is to get the whole SciML stack to have sparse support optional first. I'm not sure a LinearSolve.jl without Linear algebra is possible without a refactor of the interface so we can get the types and the norm function separate, but that might be a Julia v1.13 thing

@ChrisRackauckas
Copy link
Contributor Author

bump

ChrisRackauckas and others added 2 commits February 15, 2025 00:58
While this may seem a bit weird since the most normal case for Krylov subspace methods is on sparse arrays, there are multiple reasons for this.

1. SparseArrays pulls in SuiteSparse and thus GPL dependencies
2. This is by far the biggest part of the load. Normal Krylov.jl loads in about 8ms, but the SparseArrays part is ~150ms. So if you want to just work on operators, then you'd taking a decently sized hit.
3. This is required for downstream dependency reduction SciML/LinearSolve.jl#570
@amontoison
Copy link
Member

@ChrisRackauckas
I don't know how to use the docstrings from the extension in the documentation.
Documenter.jl complains that it can't find them.
If you know how to fix this, please feel free to go ahead.

@ChrisRackauckas
Copy link
Contributor Author

I'm not sure about that.

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