Skip to content

Conversation

@shakedregev
Copy link
Collaborator

@shakedregev shakedregev commented Nov 13, 2025

Description

Currently we cannot use HyKKT in ReSolve. This limits us when solving KKT systems to methods that cannot guarantee that we won't need to recalculate pivoting sequences. Partially addresses #308.

Proposed changes

We have classes and tests for permutation, Ruiz Scaling, Cholesky factorization, and matrix-matrix products and sums.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the 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.

  • All tests pass. Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

@shakedregev shakedregev requested a review from pelesh November 13, 2025 22:26
@shakedregev shakedregev self-assigned this Nov 13, 2025
shakedregev and others added 9 commits November 13, 2025 22:37
* Added the permutation class from hykkt, along with tests.

* refactor with base class for perm kernels

* add kernel handler to Permutation class to call appropriate functions

* add workspace parameter to test

* gpu implementations

* add PermutationHandler

* test for more rows than cols

* add documentation for permutation

* remove use of linalgworkspace and update permutation constructor

* mapIndex test

* update signatures

* memory handling and cosmetic changes

* all functions on host except mapIdx

* signature and fix leak

* Apply pre-commmit fixes

* remove unused variables

* remove unused files and members, fix build

* Apply pre-commmit fixes

* use resolve types

* Apply pre-commmit fixes

---------

Co-authored-by: shakedregev <[email protected]>
Co-authored-by: adhamsi <[email protected]>
* Added the permutation class from hykkt, along with tests.

* HyKKT GPU Permutation Kernels (Attempt 2) (#333)

* Added the permutation class from hykkt, along with tests.

* refactor with base class for perm kernels

* add kernel handler to Permutation class to call appropriate functions

* add workspace parameter to test

* gpu implementations

* add PermutationHandler

* test for more rows than cols

* add documentation for permutation

* remove use of linalgworkspace and update permutation constructor

* mapIndex test

* update signatures

* memory handling and cosmetic changes

* all functions on host except mapIdx

* signature and fix leak

* Apply pre-commmit fixes

* remove unused variables

* remove unused files and members, fix build

* Apply pre-commmit fixes

* use resolve types

* Apply pre-commmit fixes

---------

Co-authored-by: shakedregev <[email protected]>
Co-authored-by: adhamsi <[email protected]>

* set devImpl to null if no GPU backend

* Added the permutation class from hykkt, along with tests.

* add ruiz scaler and handler

* refactor the interfaces and use existing MemoryHandler for reset

* update interface

* allocate/deallocate scaling vectors

* remove handler as middleman

* add empty cpu implementation and cmakelists

* fix cmakelists

* cpu implementation

* hip implementation

* use resolve matrix and vector types

* cuda implementation

* ruiz scaling test

* fix bugs in kernel implementations

* comments in implementation files

* fix imports and leak

* update comments

* Doxygen reference and rename class

* use object pointers and update all usage

* better ruiz test

* merge conflict

* remove unused MemoryHandler

* change long function names, file name capitalization, remove unused params

* include issue

* Apply pre-commmit fixes

* error handling in constructor if no gpu support available

* fix comment

* error handling in constructor

* reset workspace after each test

* Check for J_tr

---------

Co-authored-by: shakedregev <[email protected]>
Co-authored-by: adhamsi <[email protected]>
* address the left over comments in #317

* Apply pre-commmit fixes

---------

Co-authored-by: superwhiskers <[email protected]>
* initial solver and cuda header

* cuda implementation

* minimal test on cuda passes

* cpu implementation

* tell cmake to find cholmod

* add template hip implementation

* dependencies

* cpu: memory freeing and unused fields

* Apply pre-commmit fixes

* error handling and correct memory in cuda

* randomized testing: different sparsity patterns

* Apply pre-commmit fixes

* fix for cuda: resetting workspace

* Apply pre-commmit fixes

* test reusing sparsity pattern

* Apply pre-commmit fixes

* Apply pre-commmit fixes

* draft: rocsolver

* Apply pre-commmit fixes

* fix build issue

* documentation

* Apply pre-commmit fixes

* error message when no gpu support

Co-authored-by: Shaked Regev <[email protected]>

* address minor review comments

* Apply pre-commmit fixes

* remove commented code

* more detail on documentation

* Apply pre-commmit fixes

---------

Co-authored-by: adhamsi <[email protected]>
Co-authored-by: Shaked Regev <[email protected]>
* 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 <[email protected]>
Co-authored-by: shakedregev <[email protected]>
* dependencies

* randomized testing: different sparsity patterns

* fix for cuda: resetting workspace

* Apply pre-commmit fixes

* non clean work around -- fixes cholesky test

* Fixes after rebasing.

* Fixed failing Cholesky test by resetting workspace (#370)

* fixed failing test by resetting workspace

* Apply pre-commmit fixes

* Update tests/unit/hykkt/runHykktCholeskyTests.cpp

* Apply pre-commmit fixes

---------

Co-authored-by: shakedregev <[email protected]>

* Uncommented Cholesky test on HIP backend, and added syndData calls.

---------

Co-authored-by: Adham Ibrahim <[email protected]>
Co-authored-by: adhamsi <[email protected]>
Co-authored-by: kswirydo <[email protected]>
Co-authored-by: Shaked Regev <[email protected]>
Co-authored-by: shakedregev <[email protected]>
@pelesh pelesh added enhancement New feature or request iterative solver labels Nov 20, 2025
@pelesh pelesh merged commit 084d01a into develop Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request iterative solver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants