Skip to content

Scaling test#1038

Closed
akifcorduk wants to merge 91 commits intoNVIDIA:release/26.04from
akifcorduk:scaling_test
Closed

Scaling test#1038
akifcorduk wants to merge 91 commits intoNVIDIA:release/26.04from
akifcorduk:scaling_test

Conversation

@akifcorduk
Copy link
Copy Markdown
Contributor

This PR cleans up the logs for the scaling.

akifcorduk and others added 18 commits April 2, 2026 14:32
<!--

Thank you for contributing to cuOpt :)

Here are some guidelines to help the review process go smoothly.

Many thanks in advance for your cooperation!

Note: The pull request title will be included in the CHANGELOG.
-->


## Description
There were failure due to increase in wheel size, so bumping the wheel
size limit for libcuopt


https://github.com/NVIDIA/cuopt/actions/runs/23821469086/job/69435078088?pr=1015
## Checklist

- [x] I am familiar with the [Contributing
Guidelines](https://github.com/NVIDIA/cuopt/blob/HEAD/CONTRIBUTING.md).
- Testing
   - [ ] New or existing tests cover these changes
   - [ ] Added tests
   - [ ] Created an issue to follow-up
   - [x] NA
- Documentation
   - [ ] The documentation is up to date with these changes
   - [ ] Added new documentation
   - [x] NA
@akifcorduk akifcorduk added this to the 26.04 milestone Apr 4, 2026
@akifcorduk akifcorduk added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Apr 4, 2026
@akifcorduk akifcorduk requested review from a team as code owners April 4, 2026 11:19
@akifcorduk akifcorduk closed this Apr 4, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 802d81b6-36f7-4bc8-bc8d-1c231187d44f

📥 Commits

Reviewing files that changed from the base of the PR and between 140c684 and 426e731.

📒 Files selected for processing (33)
  • ci/validate_wheel.sh
  • cpp/CMakeLists.txt
  • cpp/include/cuopt/linear_programming/constants.h
  • cpp/include/cuopt/linear_programming/mip/solver_settings.hpp
  • cpp/src/branch_and_bound/branch_and_bound.cpp
  • cpp/src/dual_simplex/phase2.cpp
  • cpp/src/dual_simplex/user_problem.hpp
  • cpp/src/grpc/cuopt_remote.proto
  • cpp/src/grpc/grpc_settings_mapper.cpp
  • cpp/src/math_optimization/solver_settings.cu
  • cpp/src/mip_heuristics/CMakeLists.txt
  • cpp/src/mip_heuristics/diversity/diversity_manager.cu
  • cpp/src/mip_heuristics/diversity/lns/rins.cu
  • cpp/src/mip_heuristics/diversity/population.cu
  • cpp/src/mip_heuristics/diversity/recombiners/sub_mip.cuh
  • cpp/src/mip_heuristics/feasibility_jump/early_gpufj.cu
  • cpp/src/mip_heuristics/mip_scaling_strategy.cu
  • cpp/src/mip_heuristics/mip_scaling_strategy.cuh
  • cpp/src/mip_heuristics/presolve/third_party_presolve.cpp
  • cpp/src/mip_heuristics/relaxed_lp/relaxed_lp.cu
  • cpp/src/mip_heuristics/solution/solution.cu
  • cpp/src/mip_heuristics/solution/solution.cuh
  • cpp/src/mip_heuristics/solve.cu
  • cpp/src/mip_heuristics/solver.cu
  • cpp/src/mip_heuristics/solver.cuh
  • cpp/src/mip_heuristics/solver_context.cuh
  • cpp/tests/mip/feasibility_jump_tests.cu
  • cpp/tests/mip/load_balancing_test.cu
  • cpp/tests/mip/multi_probe_test.cu
  • cpp/tests/mip/server_test.cu
  • cpp/tests/mip/unit_test.cu
  • python/cuopt_server/cuopt_server/tests/test_lp.py
  • python/cuopt_server/cuopt_server/utils/linear_programming/data_definition.py

📝 Walkthrough

Walkthrough

This PR introduces a new integer-based MIP scaling strategy replacing the previous boolean mip_scaling flag. It adds a new mip_scaling_strategy_t class implementing sophisticated row and objective scaling logic, updates all related settings, solver constructors, GRPC mappings, and tests to use integer scaling mode constants instead of booleans, and refactors gap computation and feasibility checking logic accordingly.

Changes

Cohort / File(s) Summary
Build & Deployment Configuration
ci/validate_wheel.sh, cpp/CMakeLists.txt, cpp/src/mip_heuristics/CMakeLists.txt
Updated wheel validation thresholds; added gRPC infrastructure compile option handling; registered MIP scaling strategy source file.
MIP Scaling Constants & Settings
cpp/include/cuopt/linear_programming/constants.h, cpp/include/cuopt/linear_programming/mip/solver_settings.hpp
Added three new preprocessor constants for MIP scaling modes (OFF=0, ON=1, NO_OBJECTIVE=2); changed mip_solver_settings_t.mip_scaling from bool to int with default CUOPT_MIP_SCALING_NO_OBJECTIVE.
MIP Scaling Strategy Implementation
cpp/src/mip_heuristics/mip_scaling_strategy.cuh, cpp/src/mip_heuristics/mip_scaling_strategy.cu
New header and implementation defining mip_scaling_strategy_t with per-row statistics computation, big-M detection, iterative row scaling toward median norm, and optional objective scaling with integer coefficient preservation validation.
Gap Computation & Optimality Logic
cpp/src/branch_and_bound/branch_and_bound.cpp
Introduced compute_user_abs_gap() function scaling absolute gap by objective scale factor; refactored user_relative_gap() and user_mip_gap() to use scaled gap computation; updated all termination/pruning logic to use scaled gaps.
Dual Simplex & Solver Output
cpp/src/dual_simplex/phase2.cpp, cpp/src/dual_simplex/user_problem.hpp
Changed callback argument from user_obj to obj; updated obj_scale documentation comment.
GRPC Interface & Serialization
cpp/src/grpc/cuopt_remote.proto, cpp/src/grpc/grpc_settings_mapper.cpp
Changed MIPSolverSettings.mip_scaling field type from bool to int32; added validation against allowed mode range in map_proto_to_mip_settings.
Parameter Registration
cpp/src/math_optimization/solver_settings.cu
Migrated CUOPT_MIP_SCALING from bool_parameters to int_parameters with three allowed mode values.
Solver Context & Constructor Changes
cpp/src/mip_heuristics/solver_context.cuh, cpp/src/mip_heuristics/solver.cuh, cpp/src/mip_heuristics/solver.cu
Removed pdlp_initial_scaling_strategy_t parameter and scaling member from mip_solver_context_t; removed scaling parameter from mip_solver_t constructor.
Main Solver Flow
cpp/src/mip_heuristics/solve.cu
Replaced PDLP initial scaling with new mip_scaling_strategy_t invocation; moved scaling before problem wrapping; removed scaling parameter from mip_solver_t construction; changed feasibility comparison logic.
Solution Feasibility
cpp/src/mip_heuristics/solution/solution.cuh, cpp/src/mip_heuristics/solution/solution.cu
Added optional consider_integrality parameter to compute_feasibility() method, enabling constraint-only feasibility checks when needed.
Diversity & Heuristic Managers
cpp/src/mip_heuristics/diversity/diversity_manager.cu, cpp/src/mip_heuristics/diversity/population.cu, cpp/src/mip_heuristics/diversity/lns/rins.cu
Removed mip_scaling unscaling/scaling from callback handlers; refactored PDLP configuration to use tolerance direct mapping; updated mip_solver_context_t construction calls; gated bound updates on feasibility.
Presolve & LP Solving
cpp/src/mip_heuristics/presolve/third_party_presolve.cpp, cpp/src/mip_heuristics/relaxed_lp/relaxed_lp.cu, cpp/src/mip_heuristics/diversity/recombiners/sub_mip.cuh
Propagated problem name and objective scaling factor through presolve; removed unused PDLP header; added scaling strategy header to sub-MIP recombiner.
Early GPU Feasibility Jump
cpp/src/mip_heuristics/feasibility_jump/early_gpufj.cu
Updated mip_solver_context_t construction to remove scaling parameter.
MIP Unit & Integration Tests
cpp/tests/mip/feasibility_jump_tests.cu, cpp/tests/mip/load_balancing_test.cu, cpp/tests/mip/multi_probe_test.cu, cpp/tests/mip/server_test.cu, cpp/tests/mip/unit_test.cu
Replaced pdlp_initial_scaling_strategy_t with mip_scaling_strategy_t in test setup; changed mip_scaling parameter type from bool to int in test parameterization; added new scaling integrity tests verifying integer coefficient preservation.
Python API & Tests
python/cuopt_server/cuopt_server/utils/linear_programming/data_definition.py, python/cuopt_server/cuopt_server/tests/test_lp.py
Updated SolverConfig.mip_scaling from Optional[bool] (default True) to Optional[int] (default 1); changed test parameterization from boolean to integer scaling modes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • MIP Row and Objective Scaling #906: Directly related; implements the same new MIP scaling strategy architecture with identical changes to solver settings type conversions, GRPC proto updates, constructor signature changes, and test refactoring across the codebase.

Suggested reviewers

  • AyodeAwe
  • kaatish
  • nguidotti
  • Iroy30
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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.

3 participants