Batch solve#81
Open
govindchari wants to merge 2 commits into
Open
Conversation
Download Benchmark ArtifactsBenchmark SummaryProblems Solved
|
Download Benchmark ArtifactsBenchmark SummaryProblems Solved
|
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.
Two benchmarks were run against the CUDA/cuDSS backend:
0.001314s, about 44x faster inside cuDSS, but end-to-end solve time was effectively unchanged: 3.508s serial vs 3.519s batch.
0.328448s, about 2.6x faster inside cuDSS, and improved end-to-end solve time modestly: 9.074s serial vs 8.694s batch, about 4.4% faster excluding setup.
Main finding: the cuDSS batch API works and speeds up the linear algebra calls, but full solver speedup is limited because most runtime is still spent in QOCO-side per-item work outside
cuDSS. Batch setup is also currently expensive because it initializes a full QOCOSolver for every batch item.
The QOCO-side work can be batched if the batch API is redesigned around shared problem structure plus batched state arrays. Good candidates:
The biggest wins would likely come from batching the per-iteration loops currently visible around compute_kkt_residual, compute_objective, compute_mu, compute_nt_scaling, and
construct_kkt_aff_rhs in algebra/cuda/cudss_backend.cu:1790. Those are currently dispatched per solver item, even though the items have common dimensions and sparsity.