Skip to content

Hipdlp kkt verify - #3788

Open
Yanyu000 wants to merge 2 commits into
latestfrom
hipdlp-kkt-verify
Open

Yanyu000 wants to merge 2 commits into
latestfrom
hipdlp-kkt-verify

Conversation

@Yanyu000

Copy link
Copy Markdown
Collaborator

Description

HiPDLP now checks its candidate solution with HiGHS's own KKT check (lpNoBasisKktCheck, as used in HiPO) when its termination test passes, and carries on iterating if the check fails, rather than returning a model status of "Unknown". There is no new option: this is the default behaviour.

  • buildOriginalSolution() maps the scaled iterate back to the original LP without modifying solver state; highsKktCheck() runs the check and logs the measures.
  • hi-pdlp-highs-kkt-check is new. hi-pdlp-feasibility-tolerances now also loosens primal_residual_tolerance, dual_residual_tolerance and optimality_tolerance, since these now make HiPDLP iterate further.
  • pdhg.cu: GetLaunchConfig returns at least one block. With zero rows left after free rows are removed, a zero-block launch invalidated the CUDA graph capture once the KKT check kept HiPDLP iterating.

Tested: full unit_tests pass on CPU and on CUDA 13.0 (RTX 4070 Ti SUPER, -DHIGHS_GPU_LIB=ON) and 13.1 (RTX A4500). Not tested: AMD HIP, and the cost of the check on large LPs.

Checklist

  • [ x] I have read the contributing guidelines
  • [x ] This PR targets the latest branch
  • [ x] Tests are passing
  • [ x] Documentation was updated where relevant
  • [ x] This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

@Yanyu000
Yanyu000 requested review from haman80 and jajhall November 24, 2026 11:48
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.05%. Comparing base (7969714) to head (bf4a3a4).
⚠️ Report is 37 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3788      +/-   ##
==========================================
+ Coverage   75.98%   76.05%   +0.07%     
==========================================
  Files         467      467              
  Lines      116545   116820     +275     
  Branches    18166    18180      +14     
==========================================
+ Hits        88553    88847     +294     
+ Misses      27752    27733      -19     
  Partials      240      240              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haman80 haman80 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this looks good. I ran HiPDLP on LP relaxations of problems from a subset of the MIPLIB 2017 collection, at tolerance 1e-4. About three quarters of the ones that used to end Unknown now end Optimal with this fix. Most of the rest pass the check before postsolve but fail it afterwards, so a postsolve-aware stopping check might be worth considering at some point.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants