-
Notifications
You must be signed in to change notification settings - Fork 197
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
Lanczos Solver #2416
Lanczos Solver #2416
Conversation
7ec5f7f
to
0f5bdcb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is coming along great, @aamijar. Mostly it needs some cleanup and polishing, but otherwise should be ready to merge once my comments are resolved.
81475a6
to
2be393a
Compare
379de5a
to
bd26c79
Compare
bd26c79
to
7b31108
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can a test for the python API of Lanczos also be added?
handle, | ||
v0_vector_const, | ||
V_0_view, | ||
[device_scalar = v0nrm_scalar.data_handle()] __device__(auto y) { return y / *device_scalar; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can v0nrm and it's copy operations be skipped this way?
[device_scalar = v0nrm_scalar.data_handle()] __device__(auto y) { return y / *device_scalar; }); | |
[device_scalar = output1.data_handle()] __device__(auto y) { return y / *device_scalar; }); |
I unfortunately don't have permissions to push on the branch of this PR so I kept the commits and continued on PR #2481. |
I unfortunately don't have permissions to push on @aamijar branch for the previous Lanczos solver PR (#2416) so I kept his commits and continued it here. ## Lanczos Solver for Sparse Eigen Decomposition We propose a new lanczos solver in raft that fixes the issues present in the previous solver `raft::sparse::solver::detail::computeSmallestEigenvectors`. Specifically we address the following issues: 1. Numerical Stability for both float32 and float64 datatypes 2. Efficiency and Speed of Convergence This new implementation is taken from the cupy library `cupyx.scipy.sparse.linalg.eigsh` where the thick-restart and full reorthogonalzation methods are used. Additionally this PR exposes a python api for raft lanczos solver with an interface similar to `scipy.sparse.linalg.eigsh` and `cupyx.scipy.sparse.linalg.eigsh`. ```py3 from pylibraft.solver import eigsh ``` Authors: - Micka (https://github.com/lowener) - Anupam (https://github.com/aamijar) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) - Corey J. Nolet (https://github.com/cjnolet) URL: #2481
Lanczos Solver for Sparse Eigen Decomposition
We propose a new lanczos solver in raft that fixes the issues present in the previous solver
raft::sparse::solver::detail::computeSmallestEigenvectors
.Specifically we address the following issues:
This new implementation is taken from the cupy library
cupyx.scipy.sparse.linalg.eigsh
where the thick-restart and full reorthogonalzation methods are used.Additionally this PR exposes a python api for raft lanczos solver with an interface similar to
scipy.sparse.linalg.eigsh
andcupyx.scipy.sparse.linalg.eigsh
.