Conversation
65b842e to
36849b0
Compare
shakedregev
left a comment
There was a problem hiding this comment.
The tests should check if this can add a matrix with a differing sparsity structure (that is not a subset of the product).
I think this is doing
|
I would add a README to HyKKT explaining different rocm requirement. |
The test was modified so that the nonzero entries of D are no longer a subset of the nonzero entries of A * B. The test passes. |
|
The tests pass and this looks good. There is a little bit more work on documentation, readme, and fixing these merge conflicts, which I can get to at some point. |
a100234 to
a20cc25
Compare
shakedregev
left a comment
There was a problem hiding this comment.
Added documentation and fixed the merge conflict (which was not a conflict at all, took both changes).
* main class and header * begin cpu * cpu implementation: no test yet * handle csc vs csr and implement minimal test * hip implemenation * cuda implementation * hip fix signature * fix cmakelists * minor fixes * Apply pre-commmit fixes * symbolic test * reuse test * fix for hip for reuse: broken * Apply pre-commmit fixes * compiler warning * reuse test working * reuse test cuda * documentation * Apply pre-commmit fixes * fix build error * Apply pre-commmit fixes * rename add functions to load * modify symbolic test for different case of D sparsity * Apply pre-commmit fixes * doc update * straggling unsaved changes * fixed typo --------- Co-authored-by: adhamsi <adhamsi@users.noreply.github.com> Co-authored-by: shakedregev <shakedvregev@gmail.com>
* Added the permutation class from hykkt, along with tests. * Implement HyKKT Ruiz Scaling (#317) * Implement the HyKKT Cholesky module (#350) * SpGEMM for HyKKT (#366) --------- Co-authored-by: superwhiskers <whiskerdev@protonmail.com> Co-authored-by: Nicholson Koukpaizan <72402802+nkoukpaizan@users.noreply.github.com> Co-authored-by: Adham Ibrahim <adham.ibrahim@princeton.edu> Co-authored-by: kswirydo <kasia.swirydowicz@gmail.com> Co-authored-by: shakedregev <shakedregev@users.noreply.github.com> Co-authored-by: Slaven Peles <peless@ornl.gov>
Description
This implements the Sparse General Matrix-Matrix multiplication (SpGEMM) module for the HyKKT solver. This provides the class
SpGEMM.cppwith functionsaddProductMatrices(matrix::Csr* A, matrix::Csr* B)addSumMatrix(matrix::Csr* D)addResultMatrix(matrix::Csr** E)compute()where
computewill store the result ofalpha * A * B + beta * DintoE. The scalars are passed to the constructor.Closes #308.
Proposed changes
The class is intended for efficient reuse. After an initial computation, the product and sum matrices can be reloaded with new values (and the same sparsity pattern) and
compute()function called again. TheaddResultMatrixneed only be called once.On CPU, this is implemented with the CHOLMOD package in SuiteSparse. On CUDA, the
cusparseSpGEMMandcusparseXcsrgeamfunctions for multiplication and addition respectively are used. On HIP, therocsparse_spgemmfunction is called.Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here
to help! This is simply a reminder of what we are going to look for before
merging your code.
-Wall -Wpedantic -Wconversion -Wextra.Further comments