Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b758b9f
fix timer issues
akifcorduk Feb 11, 2026
0392a62
disable jobserver flag when not actually using jobserver
aliceb-nv Feb 11, 2026
ee54477
disable jobserver unless explicitely requested
aliceb-nv Feb 11, 2026
f876fc0
better workaround fix build
aliceb-nv Feb 11, 2026
4bbf743
scaling test
akifcorduk Feb 16, 2026
1c02baa
Merge branch 'main' of github.com:NVIDIA/cuopt into fix_timer
akifcorduk Feb 16, 2026
7de08d2
add timers to right_looking_lu and refactoring the basis
akifcorduk Feb 17, 2026
942de9c
remove timers from cuts
akifcorduk Feb 17, 2026
0b944d1
convert lambda to function and remove unnecessary checks
akifcorduk Feb 17, 2026
71b7f2f
fix thrust changes
akifcorduk Feb 17, 2026
82b2d64
handle review comments
akifcorduk Feb 18, 2026
0c81173
handle review comments
akifcorduk Feb 18, 2026
8f93926
revert scaling
akifcorduk Feb 18, 2026
80e2650
initial row scaling for mip
akifcorduk Feb 18, 2026
f021ba3
fix pdlp issues and finalize lp scaling
akifcorduk Feb 19, 2026
609c578
move timer with inout parameters
akifcorduk Feb 19, 2026
3d32acd
fix merge conflicts
akifcorduk Feb 19, 2026
0c54ecf
fix merge conflicts
akifcorduk Feb 19, 2026
fc414e7
revert cmake comment
akifcorduk Feb 19, 2026
41f5c3e
Merge branch 'fix_timer' into scaling_test
akifcorduk Feb 19, 2026
aa0b795
root node scaling
akifcorduk Feb 20, 2026
1c03794
sscaling off
akifcorduk Feb 20, 2026
74ec555
Merge branch 'main' of github.com:NVIDIA/cuopt into scaling_test
akifcorduk Feb 20, 2026
e849c70
correct mip gap computation
akifcorduk Feb 20, 2026
ea09141
wip
akifcorduk Feb 23, 2026
adfbf7d
with scaling
akifcorduk Feb 23, 2026
92b165e
make pdlp/barrier scaling default
akifcorduk Feb 23, 2026
2b080cc
fix compule error
akifcorduk Feb 23, 2026
7a61d13
skip mip scaling
akifcorduk Feb 23, 2026
0ee8344
without skipping big M
akifcorduk Feb 24, 2026
2a500f4
mip scaling with skipping big M
akifcorduk Feb 24, 2026
d0c5a42
fix thrust build + more timer checks
aliceb-nv Feb 24, 2026
d559b34
Merge branch 'main' into fix-thrust-build
aliceb-nv Feb 24, 2026
5b5909e
Merge commit 'refs/pull/902/head' of github.com:NVIDIA/cuopt into sca…
akifcorduk Feb 24, 2026
84f8fb3
fix headers
akifcorduk Feb 24, 2026
67240f5
review comment
aliceb-nv Feb 24, 2026
a15424f
fix thrust solve
aliceb-nv Feb 24, 2026
6772270
Merge commit 'refs/pull/902/head' of github.com:NVIDIA/cuopt into sca…
akifcorduk Feb 24, 2026
4a1c672
remove nvtx
akifcorduk Feb 24, 2026
7045ae7
fix init issues
akifcorduk Feb 25, 2026
80ac99d
don't skip big m
akifcorduk Feb 25, 2026
8eaebba
do scaling beforehand
akifcorduk Feb 25, 2026
6b2a631
without big M
akifcorduk Feb 25, 2026
cfcf0ab
try with mip scaling
akifcorduk Feb 27, 2026
1db603c
with assertS
akifcorduk Feb 27, 2026
0f39c06
try without any lp scaling
akifcorduk Feb 27, 2026
9e2d2d1
Merge branch 'main' of github.com:NVIDIA/cuopt into scaling_test
akifcorduk Feb 27, 2026
4ecf8f9
Merge branch 'main' of github.com:NVIDIA/cuopt into scaling_test
akifcorduk Mar 4, 2026
ca5b07e
scaling before presolve
akifcorduk Mar 4, 2026
2f58450
fix objective issues and pdlp solver mode
akifcorduk Mar 4, 2026
071ec5d
with stable 3
akifcorduk Mar 4, 2026
a1030a7
fix issues solver mode 2
akifcorduk Mar 4, 2026
abc5583
fix issues solver mode 3
akifcorduk Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmarks/linear_programming/cuopt/run_mip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ int run_single_file(std::string file_path,
settings.tolerances.absolute_tolerance = 1e-6;
settings.presolver = cuopt::linear_programming::presolver_t::Default;
settings.reliability_branching = reliability_branching;
settings.mip_scaling = true;
settings.seed = 42;
cuopt::linear_programming::benchmark_info_t benchmark_info;
settings.benchmark_info_ptr = &benchmark_info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class mip_solver_settings_t {

/** Initial primal solutions */
std::vector<std::shared_ptr<rmm::device_uvector<f_t>>> initial_solutions;
bool mip_scaling = false;
bool mip_scaling = true;
presolver_t presolver{presolver_t::Default};
/**
* @brief Determinism mode for MIP solver.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/dual_simplex/user_problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct user_problem_t {
std::vector<std::string> row_names;
std::vector<std::string> col_names;
f_t obj_constant;
f_t obj_scale; // 1.0 for min, -1.0 for max
f_t obj_scale; // positive for min, netagive for max
bool objective_is_integral{false};
std::vector<variable_type_t> var_types;
std::vector<i_t> Q_offsets;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/mip_heuristics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(MIP_LP_NECESSARY_FILES

# Files that are MIP-specific and not needed for pure LP
set(MIP_NON_LP_FILES
${CMAKE_CURRENT_SOURCE_DIR}/mip_scaling_strategy.cu
${CMAKE_CURRENT_SOURCE_DIR}/solve.cu
${CMAKE_CURRENT_SOURCE_DIR}/solver.cu
${CMAKE_CURRENT_SOURCE_DIR}/diversity/assignment_hash_map.cu
Expand Down
15 changes: 9 additions & 6 deletions cpp/src/mip_heuristics/diversity/diversity_manager.cu
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ bool diversity_manager_t<i_t, f_t>::run_presolve(f_t time_limit)
raft::common::nvtx::range fun_scope("run_presolve");
CUOPT_LOG_INFO("Running presolve!");
timer_t presolve_timer(time_limit);

auto term_crit = ls.constraint_prop.bounds_update.solve(*problem_ptr);
if (ls.constraint_prop.bounds_update.infeas_constraints_count > 0) {
stats.presolve_time = timer.elapsed_time();
Expand Down Expand Up @@ -390,23 +391,25 @@ solution_t<i_t, f_t> diversity_manager_t<i_t, f_t>::run_solver()
} else if (!fj_only_run) {
convert_greater_to_less(*problem_ptr);

f_t tolerance_divisor =
problem_ptr->tolerances.absolute_tolerance / problem_ptr->tolerances.relative_tolerance;
if (tolerance_divisor == 0) { tolerance_divisor = 1; }
f_t absolute_tolerance = context.settings.tolerances.absolute_tolerance;
f_t tolerance_divisor = 100.;

pdlp_solver_settings_t<i_t, f_t> pdlp_settings{};
pdlp_settings.tolerances.relative_primal_tolerance = absolute_tolerance / tolerance_divisor;
pdlp_settings.tolerances.absolute_dual_tolerance = absolute_tolerance;
pdlp_settings.tolerances.relative_dual_tolerance = absolute_tolerance / tolerance_divisor;
pdlp_settings.tolerances.absolute_primal_tolerance = absolute_tolerance;
pdlp_settings.tolerances.relative_primal_tolerance = absolute_tolerance / tolerance_divisor;
pdlp_settings.tolerances.absolute_gap_tolerance = absolute_tolerance;
pdlp_settings.tolerances.relative_gap_tolerance = absolute_tolerance / tolerance_divisor;
pdlp_settings.time_limit = lp_time_limit;
pdlp_settings.first_primal_feasible = false;
pdlp_settings.concurrent_halt = &global_concurrent_halt;
pdlp_settings.method = method_t::Concurrent;
pdlp_settings.inside_mip = true;
pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable2;
pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable3;
pdlp_settings.num_gpus = context.settings.num_gpus;
pdlp_settings.presolver = presolver_t::None;

set_pdlp_solver_mode(pdlp_settings);
timer_t lp_timer(lp_time_limit);
auto lp_result = solve_lp_with_method<i_t, f_t>(*problem_ptr, pdlp_settings, lp_timer);

Expand Down
3 changes: 1 addition & 2 deletions cpp/src/mip_heuristics/diversity/lns/rins.cu
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ void rins_t<i_t, f_t>::run_rins()

std::vector<std::vector<f_t>> rins_solution_queue;

mip_solver_context_t<i_t, f_t> fj_context(
&rins_handle, &fixed_problem, context.settings, context.scaling);
mip_solver_context_t<i_t, f_t> fj_context(&rins_handle, &fixed_problem, context.settings);
fj_t<i_t, f_t> fj(fj_context);
solution_t<i_t, f_t> fj_solution(fixed_problem);
fj_solution.copy_new_assignment(cuopt::host_copy(fixed_assignment, rins_handle.get_stream()));
Expand Down
11 changes: 2 additions & 9 deletions cpp/src/mip_heuristics/diversity/population.cu
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,6 @@ void population_t<i_t, f_t>::invoke_get_solution_callback(
f_t user_bound = context.stats.get_solution_bound();
solution_t<i_t, f_t> temp_sol(sol);
problem_ptr->post_process_assignment(temp_sol.assignment);
if (context.settings.mip_scaling) {
rmm::device_uvector<f_t> dummy(0, temp_sol.handle_ptr->get_stream());
context.scaling.unscale_solutions(temp_sol.assignment, dummy);
}
if (problem_ptr->has_papilo_presolve_data()) {
problem_ptr->papilo_uncrush_assignment(temp_sol.assignment);
}
Expand Down Expand Up @@ -308,10 +304,8 @@ void population_t<i_t, f_t>::run_solution_callbacks(solution_t<i_t, f_t>& sol)
invoke_get_solution_callback(sol, get_sol_callback);
}
}
// save the best objective here, because we might not have been able to return the solution to
// the user because of the unscaling that causes infeasibility.
// This prevents an issue of repaired, or a fully feasible solution being reported in the call
// back in next run.
// Save the best objective here even if callback handling later exits early.
// This prevents older solutions from being reported as "new best" in subsequent callbacks.
best_feasible_objective = sol.get_objective();
}

Expand Down Expand Up @@ -344,7 +338,6 @@ void population_t<i_t, f_t>::run_solution_callbacks(solution_t<i_t, f_t>& sol)
incumbent_assignment.size(),
sol.handle_ptr->get_stream());

if (context.settings.mip_scaling) { context.scaling.scale_solutions(incumbent_assignment); }
bool is_valid = problem_ptr->pre_process_assignment(incumbent_assignment);
if (!is_valid) { return; }
cuopt_assert(outside_sol.assignment.size() == incumbent_assignment.size(),
Expand Down
17 changes: 0 additions & 17 deletions cpp/src/mip_heuristics/diversity/recombiners/sub_mip.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ class sub_mip_recombiner_t : public recombiner_t<i_t, f_t> {
"n_vars_from_guiding %d n_vars_from_other %d", n_vars_from_guiding, n_vars_from_other);
this->compute_vars_to_fix(offspring, vars_to_fix, n_vars_from_other, n_vars_from_guiding);
auto [fixed_problem, fixed_assignment, variable_map] = offspring.fix_variables(vars_to_fix);
// TODO ask Akif and Alice if this is ok
pdlp_initial_scaling_strategy_t<i_t, f_t> scaling(
fixed_problem.handle_ptr,
fixed_problem,
context.settings.hyper_params.default_l_inf_ruiz_iterations,
(f_t)context.settings.hyper_params.default_alpha_pock_chambolle_rescaling,
fixed_problem.reverse_coefficients,
fixed_problem.reverse_offsets,
fixed_problem.reverse_constraints,
nullptr,
context.settings.hyper_params,
true);
scaling.scale_problem();
fixed_problem.presolve_data.reset_additional_vars(fixed_problem, offspring.handle_ptr);
fixed_problem.presolve_data.initialize_var_mapping(fixed_problem, offspring.handle_ptr);
trivial_presolve(fixed_problem);
Expand Down Expand Up @@ -141,8 +128,6 @@ class sub_mip_recombiner_t : public recombiner_t<i_t, f_t> {
offspring.handle_ptr->sync_stream();
}
if (solution_vector.size() > 0) {
rmm::device_uvector<f_t> dummy(0, offspring.handle_ptr->get_stream());
scaling.unscale_solutions(fixed_assignment, dummy);
// unfix the assignment on given result no matter if it is feasible
offspring.unfix_variables(fixed_assignment, variable_map);
offspring
Expand Down Expand Up @@ -174,8 +159,6 @@ class sub_mip_recombiner_t : public recombiner_t<i_t, f_t> {
solution.size(),
offspring.handle_ptr->get_stream());
fixed_problem.post_process_assignment(fixed_assignment, false);
rmm::device_uvector<f_t> dummy(0, offspring.handle_ptr->get_stream());
scaling.unscale_solutions(fixed_assignment, dummy);
sol.unfix_variables(fixed_assignment, variable_map);
sol.clamp_within_bounds(); // Scaling might bring some very slight variable bound violations
sol.compute_feasibility();
Expand Down
Loading
Loading