Skip to content

Main merge release/26.04 2#1040

Merged
rgsl888prabhu merged 45 commits intoNVIDIA:mainfrom
rgsl888prabhu:main-merge-release/26.04_2
Apr 6, 2026
Merged

Main merge release/26.04 2#1040
rgsl888prabhu merged 45 commits intoNVIDIA:mainfrom
rgsl888prabhu:main-merge-release/26.04_2

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

Description

For #1032

nguidotti and others added 30 commits March 16, 2026 14:42
… improve-reliable-branching

# Conflicts:
#	cpp/src/branch_and_bound/pseudo_costs.cpp
…ange instead of the objective. fixed candidate ranking in reliability branching.
Signed-off-by: Nicolas Guidotti <[email protected]>
Signed-off-by: Nicolas Guidotti <[email protected]>
Signed-off-by: Nicolas Guidotti <[email protected]>
Signed-off-by: Nicolas Guidotti <[email protected]>
…g branching as a setting

Signed-off-by: Nicolas Guidotti <[email protected]>
Remove `new_slacks` variable.
…n in strong branching

Signed-off-by: Nicolas Guidotti <[email protected]>
Signed-off-by: Nicolas Guidotti <[email protected]>
## Issue

Authors:
  - Cindy Wilkinson (https://github.com/cwilkinson76)

Approvers:
  - Ramakrishnap (https://github.com/rgsl888prabhu)

URL: NVIDIA#1028
nguidotti and others added 15 commits April 2, 2026 19:04
…ig. Use user object for relative complementarity gap. Initialize logger so we get feedback when reading large mps files
Improvements to reliability branching by the one and only @nguidotti !
This PR replaced `solved_by_pdlp` with `solved_by` in `optimization_problem_solution_t` and all associated objects, such that now it is possible to retrieve which method was used for solving the LP when running in concurrent mode. This also fix a typo in the `CUOPT_TERMINATION_STATUS` and updates the B&B logs to display the method used for solving the root relaxation.

## Issue
Closes NVIDIA#787

Authors:
  - Nicolas L. Guidotti (https://github.com/nguidotti)
  - Ishika Roy (https://github.com/Iroy30)

Approvers:
  - Ramakrishnap (https://github.com/rgsl888prabhu)
  - Nicolas Blin (https://github.com/Kh4ster)

URL: NVIDIA#822
…anching (NVIDIA#994)

This PR enables the following regarding batch PDLP:
- Enable batch PDLP in reliability branching
- Add work stealing so that batch PDLP and Dual Simplex can run concurrently and steal LPs from each other if one solves it first
- Use correct problem representation with cuts for batch PDLP 
- Use a PDLP warm start cache across strong branching at the root and in reliability branching
- Increase tolerance on batch PDLP to have higher quality solution
- Increase iteration limit to allow instances that needs a high iteration count (with low cost per iteration) to still come through (only while solving the original LP to get warm start data)
- Multiple heuristics to not run batch PDLP to not create overheads when Dual Simplex is clearly superior
- Don't store and copy primal dual solution unless need it to save on memory
- Handle batch PDLP errors better, allowing Dual Simplex to still continue in strong branching even if BPDLP fails
- No early exit if the initial warm start PDLP solution is already feasible in BPDLP
- Correct objective for BPDLP when there is an offset

Currently we still keep BPDLP off by default both at the root and in reliability branching

Authors:
  - Nicolas Blin (https://github.com/Kh4ster)
  - Trevor McKay (https://github.com/tmckayus)
  - Chris Maes (https://github.com/chris-maes)

Approvers:
  - Nicolas L. Guidotti (https://github.com/nguidotti)
  - Trevor McKay (https://github.com/tmckayus)
  - Chris Maes (https://github.com/chris-maes)

URL: NVIDIA#994
mip_scaling_strategy.cu implements a GPU-accelerated row-scaling and objective-scaling strategy for MIP problems that improves numerical conditioning before solving.

Objective scaling (scale_objective): scales small objective coefficients up so the smallest nonzero magnitude reaches a minimum threshold (~1e-2), guarded by a max-coefficient cap to avoid blowing up large values.

Iterative row scaling (scale_problem): runs up to 8 iterations of per-row scaling to reduce the log2-spread of row infinity norms across the constraint matrix. Each iteration:

- Computes a median-based target norm (excluding big-M and zero-RHS rows for outlier robustness)
- Picks a per-row scaling factor clamped to [1/32, 32], with tighter [1/16, 1] limits for big-M rows and rows that are already numerically large
- Preserves integer coefficient integrality for integer variables by preferring power-of-two scaling factors (exact in IEEE 754) or integer-GCD-preserving multipliers
- Tracks cumulative scaling per row within a [1/256, 256] band
- Stops early when the spread improvement stalls below a relative tolerance

The current optimal setup is with only row scaling, that's why I have left row scaling only as default.

This also fixes a bug of setting lower bound of an approximate PDLP and Barrier solution. Now we set the bound only if the relaxation solution is fully feasible on absolute per row tolerances. With main+bug fix, number of infinite mip_gaps are 5-6 instances, with scaling it is only 1. So, scaling is able find 4-5 instances in with the absolute feasible root relaxation (does not necessarily mean basic solution in dual simplex).

Overall we are able to find 2 more optimal solutions compared to main + lower bound bug fix. And ~1% mip gap improvement.


## Summary by CodeRabbit

* **New Features**
  * MIP row-scaling enabled by default for improved numeric robustness.
  * Solver returns partial results early when time limits are reached; time-limit enforcement is more proactive.
  * New selectable MIP scaling configurations with logging of the selected scaling setup.

* **Bug Fixes**
  * Fixed inconsistent unscaling and feasibility handling to prevent mismatched solution states.

* **Chores**
  * Removed a deprecated MIP configuration option.
  * Consolidated and replaced the scaling strategy; tests and build updated accordingly.

Authors:
  - Akif ÇÖRDÜK (https://github.com/akifcorduk)
  - Alice Boucher (https://github.com/aliceb-nv)
  - Ramakrishnap (https://github.com/rgsl888prabhu)

Approvers:
  - Chris Maes (https://github.com/chris-maes)
  - Ishika Roy (https://github.com/Iroy30)
  - Ramakrishnap (https://github.com/rgsl888prabhu)

URL: NVIDIA#906
Fix issue with infinite lower bounds and try to bound free variables in barrier from our @chris-maes
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 6, 2026

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.

@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Apr 6, 2026
@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

/ok to test b5b6dfa

@rgsl888prabhu rgsl888prabhu merged commit 8e80e60 into NVIDIA:main Apr 6, 2026
29 of 30 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR refactors solver method attribution from boolean flags to enumerated types, introduces configurable MIP hyper-parameters, implements cooperative dual-simplex/PDLP strong branching with shared context, adds MIP row/objective scaling logic, and extends CLI with parameter file serialization and hidden hyper-parameter filtering.

Changes

Cohort / File(s) Summary
Method Type Refactoring
cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp, cpp/include/cuopt/linear_programming/pdlp/solver_solution.hpp, cpp/include/cuopt/linear_programming/cpu_optimization_problem_solution.hpp, cpp/include/cuopt/linear_programming/optimization_problem_solution.hpp, cpp/include/cuopt/linear_programming/optimization_problem_solution_interface.hpp, cpp/include/cuopt/linear_programming/utilities/cython_types.hpp
Replaced boolean solved_by_pdlp field with method_t solved_by enum across solution types; added method_t::Unset enum value and method_to_string() helper; updated termination information and LP/GPU solution interfaces.
MIP Hyper-Parameters & Settings
cpp/include/cuopt/linear_programming/mip/heuristics_hyper_params.hpp, cpp/include/cuopt/linear_programming/mip/solver_settings.hpp, cpp/include/cuopt/linear_programming/constants.h, cpp/include/cuopt/linear_programming/solver_settings.hpp
Added mip_heuristics_hyper_params_t struct with 18 tunable fields (population size, RINS limits, recombiner settings, etc.); extended MIP settings with new branching parameters (mip_batch_pdlp_reliability_branching, strong_branching_simplex_iteration_limit); changed mip_scaling from bool to int; added parameter load/dump methods.
Strong Branching & Cooperative Architecture
cpp/src/branch_and_bound/shared_strong_branching_context.hpp, cpp/src/branch_and_bound/pseudo_costs.hpp, cpp/src/branch_and_bound/pseudo_costs.cpp, cpp/src/branch_and_bound/branch_and_bound.hpp, cpp/src/branch_and_bound/branch_and_bound.cpp
Introduced shared strong-branching context for concurrent DS/PDLP execution; refactored strong_branching() and reliable_variable_selection() signatures to accept root solution, new slacks, basis info, and upper bound; added warm-cache support for PDLP in pseudo-costs.
MIP Scaling Strategy
cpp/src/mip_heuristics/mip_scaling_strategy.cuh, cpp/src/mip_heuristics/mip_scaling_strategy.cu, cpp/src/mip_heuristics/CMakeLists.txt, cpp/src/mip_heuristics/solve.cu, cpp/src/mip_heuristics/solver.cuh, cpp/src/mip_heuristics/solver_context.cuh
Added new mip_scaling_strategy_t class for GPU-based row/objective scaling with integer coefficient preservation; integrated into MIP solver pipeline conditional on mip_scaling setting; removed prior PDLP initial scaling strategy usage.
CLI & Parameter Serialization
cpp/cuopt_cli.cpp, cpp/src/math_optimization/solver_settings.cu, cpp/include/cuopt/linear_programming/utilities/internals.hpp
Added load_parameters_from_file() and dump_parameters_to_file() methods with config file parsing/generation; added --params-file, --dump-params, --dump-hyper-params CLI flags; hidden hyper-parameter arguments from CLI; enhanced parameter metadata with descriptions.
Barrier & Dual Simplex Core
cpp/src/barrier/barrier.cu, cpp/src/dual_simplex/phase2.cpp, cpp/src/dual_simplex/phase2.hpp, cpp/src/dual_simplex/presolve.cpp, cpp/src/dual_simplex/presolve.hpp, cpp/src/dual_simplex/crossover.cpp, cpp/src/dual_simplex/right_looking_lu.cpp, cpp/src/dual_simplex/simplex_solver_settings.hpp
Updated residual norm computation in barrier; refactored phase2 reduced-cost helpers; added barrier-only presolve for free variables with negation transformation; suppressed concurrent-halt logs in MIP mode; added strong branching iteration limit and reliability branching settings.
MIP Heuristics Infrastructure
cpp/src/mip_heuristics/diversity/diversity_config.hpp, cpp/src/mip_heuristics/diversity/diversity_manager.cu, cpp/src/mip_heuristics/local_search/feasibility_pump/*, cpp/src/mip_heuristics/local_search/local_search.cu, cpp/src/mip_heuristics/local_search/local_search.cuh, cpp/src/mip_heuristics/diversity/lns/rins.*, cpp/src/mip_heuristics/diversity/recombiners/*, cpp/src/mip_heuristics/problem/problem.*
Wired hyper-parameters from settings.heuristic_params to diversity manager, RINS, feasibility pump, and local search; converted fixed thread arrays to dynamic unique_ptr vectors; added configurable cycle detection length and presolve time limits; removed old diversity/RINS configuration fields.
PDLP Solver
cpp/src/pdlp/pdlp.cu, cpp/src/pdlp/pdlp.cuh, cpp/src/pdlp/solve.cu, cpp/src/pdlp/solver_settings.cu, cpp/src/pdlp/termination_strategy/termination_strategy.*, cpp/src/pdlp/pdlp_constants.hpp, cpp/src/pdlp/utilities/ping_pong_graph.cu
Added support for cooperative strong branching via shared context view; implemented initial PDLP iteration setter/getter; enhanced batch termination/climber tracking; updated concurrent-limit handling; improved batch memory estimation; added warm-start initialization from settings; synchronized SpMM buffer sizes for batch changes.
Test Suite Updates
cpp/tests/linear_programming/pdlp_test.cu, cpp/tests/linear_programming/c_api_tests/c_api_test.c, cpp/tests/linear_programming/unit_tests/solution_interface_test.cu, cpp/tests/mip/*
Added five new cooperative strong-branching PDLP tests; updated LP/MILP tests to use method_t instead of boolean flags; added scaling integrity tests for integer coefficient preservation; added HeuristicsHyperParamsTest with 12 test cases for config file serialization; replaced PDLP initial scaling with new MIP scaling strategy in feasibility jump, load balancing, and multi-probe tests.
Python Bindings
python/cuopt/cuopt/linear_programming/solution/solution.py, python/cuopt/cuopt/linear_programming/solver/solver.pxd, python/cuopt/cuopt/linear_programming/solver/solver_wrapper.pyx, python/cuopt/cuopt/linear_programming/solver_settings/solver_settings.py, python/cuopt/cuopt/tests/linear_programming/test_lp_solver.py
Added SolverMethod.Unset enum; replaced solved_by_pdlp with solved_by field; deprecated get_solved_by_pdlp() with warning, replaced with get_solved_by(); updated Cython struct mapping; updated test assertions.
Python Server Infrastructure
python/cuopt_self_hosted/cuopt_sh_client/*, python/cuopt_server/cuopt_server/utils/linear_programming/data_definition.py, python/cuopt_server/cuopt_server/utils/linear_programming/solver.py, python/cuopt_server/cuopt_server/tests/test_lp.py
Updated ThinClientSolution to use solved_by string instead of solved_by_pdlp boolean; changed SolverConfig.mip_scaling from bool to int; added mip_batch_pdlp_reliability_branching config; updated test data to use CUOPT_MIP_SCALING_* constants.
Proto & gRPC
cpp/src/grpc/cuopt_remote.proto, cpp/src/grpc/cuopt_remote_service.proto, cpp/src/grpc/grpc_settings_mapper.cpp, cpp/src/grpc/grpc_solution_mapper.cpp, cpp/src/grpc/server/grpc_worker.cpp
Updated MIPSolverSettings.mip_scaling from bool to int32; replaced LPSolution.solved_by_pdlp bool with int32 solved_by; updated proto mappers to validate and handle int mip_scaling; updated solution serialization to use method enum.
Documentation & Examples
docs/cuopt/source/cuopt-c/lp-qp-milp/examples/*, docs/cuopt/source/cuopt-c/lp-qp-milp/lp-qp-example.rst, docs/cuopt/source/cuopt-server/examples/lp-examples.rst, docs/cuopt/source/faq.rst
Reformatted C example code (whitespace/indentation only); updated MPS file download URLs to GitHub raw content URLs; updated FAQ repository reference to cuopt-examples branch.
Build & CMake
cpp/CMakeLists.txt, cpp/src/mip_heuristics/CMakeLists.txt
Refactored gRPC infrastructure source collection; moved clique_table.cu from non-LP to LP-necessary files; added mip_scaling_strategy.cu to non-LP files; ensured NDEBUG flag applied consistently to gRPC sources.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

This PR introduces substantial, multi-pattern changes across the solver stack: (1) pervasive method-type refactoring affecting solution interfaces and termination tracking, (2) new hyper-parameter infrastructure with config serialization, (3) cooperative strong-branching architecture with shared context, (4) GPU-accelerated scaling strategy, (5) extensive CLI enhancements, and (6) coordinated updates across C++, gRPC, Python, and test layers. While many changes are localized refactors of similar patterns (e.g., swapping boolean fields for enums), the heterogeneity spans core algorithms (barrier, dual simplex, PDLP), MIP heuristics, build infrastructure, and multi-language bindings, requiring separate reasoning for each subsystem integration.

Possibly related PRs

Suggested labels

breaking, improvement, pdlp, mip, P1

Suggested reviewers

  • Iroy30
  • chris-maes
  • Kh4ster
  • tmckayus
  • nguidotti
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

9 participants