Skip to content

Conversation

@hlinsen
Copy link
Contributor

@hlinsen hlinsen commented Jul 25, 2025

This PR implements:

  • Adapters to presolve/postolve before/after running the solver
  • Fetching of Papilo headers through Cmake
  • System install of boost for pip wheel
  • Runtime boolean parameter to enable the feature (true by default for MIP, false for LP).

Notes:

  • LP is off by default due to some presolvers not supporting dual post solve. These presolvers can be disabled but reduction quality is impacted.
  • Post-solve status can appear as fail due to absolute/relative tolerances. Papilo uses absolute tolerance during post solve checks. Advice is to set relative tol in cuOpt to a very small value.
  • TBB is disabled. To be enabled in a follow up PR for parallel presolve.

Fixes #277

Credits to: @rg20

@hlinsen hlinsen requested review from a team as code owners July 25, 2025 02:14
@hlinsen hlinsen requested review from jameslamb and tmckayus July 25, 2025 02:14
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jul 25, 2025

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.

@hlinsen hlinsen requested review from akifcorduk and chris-maes July 25, 2025 02:14
Copy link
Contributor

@aliceb-nv aliceb-nv left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the great work Rajesh and Hugo!!
Approving with a few comments :)
Also, could you perhaps add a few tests ensuring third-party presolve works well? Checking infeasibility detection, for example


// FIXME:: reduced_solution.get_stats() is not correct, we need to compute the stats for the
// full problem
full_sol.post_process_completed = true; // hack
Copy link
Contributor

Choose a reason for hiding this comment

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

full_problem.post_process_solution() should be able to be called right? Since it's on the original problem with no presolving, it should be a no-op

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think yes, you're right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Calling full_problem.post_process_solution requires an unecessary call to preprocess_problem

@hlinsen hlinsen added the feature request New feature or request label Jul 25, 2025
@hlinsen hlinsen added this to the 25.08 milestone Jul 25, 2025
@hlinsen hlinsen added non-breaking Introduces a non-breaking change mip labels Jul 25, 2025
@tmckayus
Copy link
Contributor

Looks like we at least need a definition added to the lp-milp-settings.rst document, also looking at Python stuff for any gaps ....

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 12, 2025

@hlinsen Do we need tbb as well or is it disabled ?

It has been disabled and it can impact the runtime performance on large models due to lack of parallelism. I'd like to enable it in a follow up PR

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 12, 2025

/ok to test de00644

Copy link
Collaborator

@rgsl888prabhu rgsl888prabhu left a comment

Choose a reason for hiding this comment

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

Few minor requests

problem = detail::problem_t<i_t, f_t>(reduced_problem);
presolve_time = presolve_timer.elapsed_time();
CUOPT_LOG_INFO("Third party presolve time: %f", presolve_time);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but we might want to add an setting to write out the presolved model.

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 12, 2025

/ok to test faf0200

Copy link
Collaborator

@rgsl888prabhu rgsl888prabhu left a comment

Choose a reason for hiding this comment

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

Minor change, rest looks good. awesome work @hlinsen

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 12, 2025

/ok to test b490069

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 13, 2025

/ok to test acae869

@rgsl888prabhu
Copy link
Collaborator

@hlinsen Lets also add details on papilo being by default available in one and not in another, lets add it in FAQ and any other places where we can highlight this behavior

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 13, 2025

/ok to test 69a5d2b

@hlinsen
Copy link
Contributor Author

hlinsen commented Aug 13, 2025

/merge

@rapids-bot rapids-bot bot merged commit 0845a21 into NVIDIA:branch-25.10 Aug 13, 2025
143 of 144 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request mip non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] MIP Presolve

8 participants