Skip to content

Add iterative refinement to the GPU ADAT solve path - #1680

Merged
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
rg20:adat_ir
Aug 7, 2026
Merged

Add iterative refinement to the GPU ADAT solve path#1680
rapids-bot[bot] merged 1 commit into
NVIDIA:mainfrom
rg20:adat_ir

Conversation

@rg20

@rg20 rg20 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

Adds iterative refinement to the GPU ADAT (Schur-complement) solve path in the barrier solver

Changes:

  • Implement a simple ADAT matvec (gpu_adat_multiply_simple) that does not rely on pre-allocated cuSPARSE descriptors
  • Apply GMRES-based iterative refinement after the ADAT Cholesky solve (Hiverge proposed Richardson-style; GMRES chosen based on our experiments for better robustness)
  • Improves accuracy when the diagonal scaling D becomes ill-conditioned near convergence
  • Previously only the augmented-KKT path had iterative refinement; the ADAT path had none

Motivation:
As the barrier parameter shrinks, D spans huge magnitude ranges and the direct Cholesky solve alone can degrade. Refining the ADAT solution improves robustness on ill-conditioned LP/QP instances without affecting the SOCP path (which does not use the Schur-complement formulation).

Benchmarks:

  • LP Barrier (10 min): Optimal 32 → 34, suboptimal 3 → 4, unsolved 14 → 11. 9% geometric mean speedup.
  • QP (Maros): All 136 problems solved (131 optimal, 5 suboptimal); previously 130 optimal, 2 suboptimal, 4 failures. 27% geometric mean speedup.
  • QCQP: bdry3 goes from suboptimal → optimal. No performance change.
  • SOCP: Slight differences possibly from code perturbation; this change is inactive for SOCP (Schur-complement path only).

Acknowledgment: This improvement was proposed by the Hiverge AI discovery engine with experiments by @kerry-hiverge.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

@rg20
rg20 requested a review from a team as a code owner August 5, 2026 20:51
@rg20
rg20 requested review from Kh4ster and nguidotti August 5, 2026 20:51
@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rg20
rg20 marked this pull request as draft August 5, 2026 20:51
@rg20
rg20 marked this pull request as ready for review August 6, 2026 22:36
@rg20
rg20 requested review from chris-maes and mlubin and removed request for Kh4ster and nguidotti August 6, 2026 22:37
@rg20 rg20 added the improvement Improves an existing functionality label Aug 6, 2026
@rg20 rg20 added this to the 26.10 milestone Aug 6, 2026
@rg20 rg20 added the non-breaking Introduces a non-breaking change label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The benchmark script now discovers compressed MPS files. The barrier solver adds device-vector ADAT multiplication and optional GMRES iterative refinement for eligible non-augmented solves.

Changes

Benchmark input discovery

Layer / File(s) Summary
Compressed MPS file matching
benchmarks/linear_programming/run_mps_files.sh
Non-recursive discovery now includes .mps.gz files alongside existing .mps, .MPS, and .SIF files.

ADAT iterative refinement

Layer / File(s) Summary
ADAT multiply and GMRES refinement
cpp/src/barrier/barrier.cu
gpu_adat_multiply_simple computes the ADAT operator with diagonal scaling. Eligible non-augmented solves can use GMRES iterative refinement and log residuals above the configured threshold.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: chris-maes, mlubin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the ADAT iterative refinement changes, motivation, scope, and reported benchmark results.
Title check ✅ Passed The title clearly and concisely identifies the main change: iterative refinement in the GPU ADAT solve path.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
cpp/src/barrier/barrier.cu (1)

1721-1735: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Reuse a persistent ADAT workspace.

Line 1727 allocates a device vector for every GMRES matrix-vector product. GMRES invokes this callback repeatedly. Reuse an iteration-owned workspace, such as d_u_, to avoid repeated device allocation in the solve hot path.

Proposed refactor
-    rmm::device_uvector<f_t> u(n, stream_view_);
+    auto& u = d_u_;
     cusparse_view_.transpose_spmv(1.0, y, 0.0, u);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/src/barrier/barrier.cu` around lines 1721 - 1735, Update
gpu_adat_multiply_simple to reuse the iteration-owned persistent workspace d_u_
instead of allocating a new device_uvector<f_t> on each call. Ensure d_u_ is
sized and valid for n before transpose_spmv and subsequent elementwise
multiplication, while preserving the existing computation and synchronization
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@cpp/src/barrier/barrier.cu`:
- Around line 1721-1735: Update gpu_adat_multiply_simple to reuse the
iteration-owned persistent workspace d_u_ instead of allocating a new
device_uvector<f_t> on each call. Ensure d_u_ is sized and valid for n before
transpose_spmv and subsequent elementwise multiplication, while preserving the
existing computation and synchronization behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3c1bed04-2642-4f5d-83ce-d3dd8a368a02

📥 Commits

Reviewing files that changed from the base of the PR and between 361d41f and 8580c87.

📒 Files selected for processing (2)
  • benchmarks/linear_programming/run_mps_files.sh
  • cpp/src/barrier/barrier.cu

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@rg20

rg20 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 8580c87

@copy-pr-bot

copy-pr-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

/ok to test 8580c87

@rg20, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@rg20

rg20 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 86ff783

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

@chris-maes chris-maes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @rg20 !

@rg20

rg20 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit f3ebc67 into NVIDIA:main Aug 7, 2026
177 of 180 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants