-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Lang] Support linear system solving on GPU with cuSolver #5860
Conversation
✅ Deploy Preview for docsite-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Sorry for the late response! Just flew back from a conference today. I will do a more careful review tomorrow!
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.
Thanks a lot! LGTM mostly! I only have few nits:
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.
LGTM! Thanks!
Related issue = #2906
We implement a basic linear system solver according to cuSolverSp_LinearSolver.
The demo is shown in
misc/test_coo_cusolver.py
. To solve a linear system, you could follow the steps as below:ti.ndarrays
according to COO format, the datatype of row/column indices ndarray should beti.i32
and the datatype ofvalue
ndarray should beti.f32
.ti.linagl.SparseMatrix
asA
.build_coo
function. The sparse matrix will be stored in CSR format.ti.linalg.SparseSolver
.ti.ndarrray
to store the right hand sideb
of linear system and the unkonw variablesx
.A * x = b
withsolve_cu
function.