Repository navigation
Conversation
Use ORNL container regristry in this mirror.
Add external Re::Solve interface (cleaned)
Remove legacy embedded ReSolve integration
* Enable EVLOSER GPU execution in hybrid mode * Add explicit EVLOSER backend tests * Update sparse drivers for EVLOSER * Clean up EVLOSER backend code and comments * Simplify Ex2 EVLOSER backend selection * Simplify Ex1 EVLOSER test setup
* Clean up ReSolve CUDA and HIP guards * Simplify ReSolve integration conditions * Clarify ReSolve integration assumptions * Fix finding Re::Solve; providing ReSolve_DIR should be sufficient. --------- Co-authored-by: Tamar DeWilde <tamard19@gmail.com>
Validation results@tamar-dewilde validated the HiOp interface to ReSolve HyKKT against HiOp CPU
CUDA
HIP
The targeted HyKKT tests completed successfully on CPU, hybrid CUDA, CUDA/RAJA, and HIP/RAJA paths. Full validation logs: |
|
Here is CPU validation log on my machine (only sparse solvers test outputs). HiOp was built with GCC 13.4 with default options plus |
| // Sparse LU solvers require the inertia-free approach. | ||
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip) && | ||
| !(inertia_free)) { | ||
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip || use_hykkt) && !(inertia_free)) { | ||
| inertia_free = true; | ||
| printf("Selected LU sparse solver requires inertia free approach. "); | ||
| printf("Selected sparse solver requires the inertia-free approach. "); |
There was a problem hiding this comment.
I'm not sure that this is correct mathematically. Even if it is, we should explain it better.
shakedregev
left a comment
There was a problem hiding this comment.
I think we need to condition requiring inertia free on the specific solver. HyKKT can simple return (n,m,0) if it succeeds, and some arbitrary wrong inertia if not.
| // Sparse LU solvers require the inertia-free approach. | ||
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip) && | ||
| !(inertia_free)) { | ||
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip || use_hykkt) && !(inertia_free)) { |
There was a problem hiding this comment.
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip || use_hykkt) && !(inertia_free)) { | |
| if((use_resolve_cuda_glu || use_resolve_cuda_rf || use_resolve_hip || use_hykkt) && !(inertia_free)) | |
| "HyKKT does not require an inertia free method, but the current implementation does. TODO: Allow HyKKT to use inertia requiring methods." | |
| { |
|
CUDA tests for Re::Solve interface all pass on V100 architecture. Log attached. |
214cd24 to
e761308
Compare
|
All tests still pass, but now the code matches HiOp's standards. HyKKT solver interface implementation is now in |
49e3ac5 to
18115de
Compare
|
tracked upstream |
Description
This PR adds HiOp interface to HyKKT solver from Re::Solve library.
HyKKT operates directly on the sparse KKT matrix blocks instead of using the existing Re::Solve sparse linear solver interface. The interface takes KKT matrix and rhs vector blocks from HiOp, solves KKT system and sends the solution back to HiOp.
The integration supports CPU, hybrid, and GPU execution using HiOp's existing memory and compute modes.
Proposed changes
hiopKKTLinSysCompressedSparseXDYcYdHyKKTas the HiOp interface to ReSolve HyKKT.mem_spaceandcompute_modesettings.linear_solver_sparse=hykkt,hykkt_gamma, andhykkt_residual_toloptions.xdycydKKT formulation for HyKKT, selecting it whenKKTLinsys=autoand falling back tolinear_solver_sparse=autowhen an incompatible KKT formulation is explicitly requested.-hykktsupport to the sparse and RAJA example drivers.solve().build_kkt_matrix()failures throughhiopKKTLinSysCurvCheck::factorize()andfactorize_inertia_free()so HyKKT setup failures are returned to the optimization algorithm.Checklist
NlpSparse2_HyKKTNlpSparse2_HyKKT(hybrid) andNlpSparseRaja2_HyKKT_CUDANlpSparse2_HyKKTandNlpSparseRaja2_HyKKT_HIP-Wall -Wpedantic -Wconversion -Wextra.Further comments
There are several current limitations to the HyKKT integration:
HyKKTSolver::solve(). As a result, factorization failure cannot currently participate in HiOp's regularization retry path in the same way as the existing direct sparse solvers.ir_outer_maxit=0because HyKKT performs a complete factorization and solve for each call. This is currently set by the example drivers rather than enforced for all uses oflinear_solver_sparse=hykkt.This also changes the shared
hiopKKTLinSysCurvCheckfactorization path so that failures returned bybuild_kkt_matrix()are propagated instead of being discarded. Among the existing implementations, this can affecthiopKKTLinSysCondensedSparseandhiopKKTLinSysSparseNormalEqn, which have matrix-build failure paths, in addition to HyKKT.