Skip to content

Correctly return reduced costs for PDLP (stable3) - #1797

Open
mlubin wants to merge 1 commit into
NVIDIA:mainfrom
mlubin:fix/pdlp-reduced-costs
Open

Correctly return reduced costs for PDLP (stable3)#1797
mlubin wants to merge 1 commit into
NVIDIA:mainfrom
mlubin:fix/pdlp-reduced-costs

Conversation

@mlubin

@mlubin mlubin commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The Stable3 preset of PDLP (the default) didn't return reduced costs. All other presets did return this. Fixed and added test coverage.

@mlubin
mlubin requested review from a team as code owners August 25, 2026 17:26
@mlubin
mlubin requested a review from tmckayus August 25, 2026 17:26
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 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.

@mlubin
mlubin requested review from Kh4ster and removed request for tmckayus August 25, 2026 17:26
@mlubin mlubin added bug Something isn't working non-breaking Introduces a non-breaking change labels Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bfde588d-cadc-4b73-ab04-1dbbe6f41559

📥 Commits

Reviewing files that changed from the base of the PR and between 48595a7 and 0c9a6e4.

📒 Files selected for processing (1)
  • cpp/src/pdlp/termination_strategy/convergence_information.cu

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The reflected dual-residual computation now validates and copies dual_slack into reduced_cost_. Device scalar initialization uses typed constants. A parameterized CUDA test validates LP solutions across three solvers and three presolvers.

Changes

LP residual validation

Layer / File(s) Summary
Reflected dual-residual workspace
cpp/src/pdlp/termination_strategy/convergence_information.cu
The reflected path validates dual_slack, copies it into reduced_cost_, and computes the residual from that workspace. Convergence scalars use typed zero, one, and negative-one constants.
Parameterized LP solution coverage
cpp/tests/linear_programming/unit_tests/lp_solution_test.cu, cpp/tests/linear_programming/CMakeLists.txt
The test checks primal, dual, reduced-cost, objective, termination, and solver-method results across PDLP, DualSimplex, and Barrier with None, PSLP, and Papilo presolvers. CMake adds the test source to LP_UNIT_TEST.

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

Merge Risk: ⚪ Minimal · up to 0c9a6

The change is localized to correctly returning PDLP reduced costs and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: kh4ster, aliceb-nv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately states that the default Stable3 PDLP preset did not return reduced costs and that the pull request fixes this issue with added test coverage.
Title check ✅ Passed The title clearly and concisely identifies the main change: correcting reduced-cost output for PDLP Stable3.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Signed-off-by: Miles Lubin <mlubin@nvidia.com>
@mlubin
mlubin force-pushed the fix/pdlp-reduced-costs branch from 48595a7 to 0c9a6e4 Compare August 25, 2026 21:27
@mlubin

mlubin commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0c9a6e4

@github-actions

Copy link
Copy Markdown

CI Test Summary

3 failed · 28 passed · 0 skipped

conda-cpp-tests / 13.0.3, 3.14, arm64, rockylinux8, l4, latest-driver, latest-deps — 3 failed tests
  • DefaultServerTests.DeleteQueuedJobPreventsRun
  • DefaultServerTests.DeleteRunningJobCancelsWorker
  • DeterministicBBTest.reproducible_solution_vector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants