Enable EVLOSER GPU backends in hybrid mode - #8
Open
tamar-dewilde wants to merge 4 commits into
Open
Conversation
Collaborator
Author
|
Validated against HiOp CPU
CUDA
HIP
The targeted tests confirmed the expected Full validation logs: |
nkoukpaizan
approved these changes
Aug 5, 2026
nkoukpaizan
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me. Tested on the HIP and CUDA backends.
| bool input_on_device_; | ||
|
|
||
| /// ReSolve uses a CUDA or HIP refactorization backend. | ||
| bool use_accelerator_; |
Collaborator
There was a problem hiding this comment.
Is there a particular reason for use_device_ --> use_accelerator_? You might also consider something like compute_on_device_ to mirror the input_on_device_ variable.
Collaborator
Author
There was a problem hiding this comment.
No particular reason beyond distinguishing the ReSolve backend from the input memory location. compute_on_device_ makes that clearer and mirrors input_on_device_ better. It has been renamed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR allows the external EVLOSER interface to use CUDA or HIP refactorization in hybrid mode when HiOp data is stored in host memory.
Previously,
use_device_was used both to track where the HiOp data was stored and to decide whether ReSolve should use a GPU backend. Because of this, hybrid mode continued to use KLU when the HiOp data was stored on the host.This PR separates those decisions so HiOp can keep its data in host memory while ReSolve uses the selected GPU backend.
Closes #6
@pelesh
Proposed changes
use_device_with two separate flags:input_on_device_tracks where the HiOp input data is stored.compute_on_device_tracks whether ReSolve uses a CUDA or HIP GPU backend.-evloseroption toNlpSparseEx1and setverbosity_levelto 3 so the selected backend is printed for the regression test.FAIL_REGULAR_EXPRESSIONon theRefactorization:andUse IR:output lines to reject the wrong backend configuration.NlpSparseEx4with the external EVLOSER interface.use_ginkgo_cudainitialization inNlpSparseEx1andNlpSparseEx4.Checklist
make testandmake test_install). Code tested on:NlpSparseEx1andNlpSparseEx2self checks pass to six digits, andNlpSparseEx4completes successfully. Code tested on:-Wall -Wpedantic -Wconversion -Wextra.Further comments
Using
compute_mode=autowith data in host memory continues to use KLU. Selectingcompute_mode=hybridorcompute_mode=gpuenables the available GPU backend.The previous general hybrid test was replaced with explicit tests for each supported EVLOSER backend.
NlpSparseEx4is not currently registered as a CTest, and its existing self-check saved values do not match the current problem, so adding a registration would require separate work. The updated EVLOSER path was therefore validated manually by checking successful completion and solver status. Updating the Ex4 regression coverage is outside the scope of this PR.