Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d65be83
main baseline test
akifcorduk Apr 24, 2026
eb5d586
fix thread count
akifcorduk Apr 24, 2026
c03842b
initial version of odd-cycle cuts
akifcorduk May 4, 2026
056552f
Merge branch 'main' of github.com:NVIDIA/cuopt into main_baselin
akifcorduk May 7, 2026
e7bf32c
with gap computation
akifcorduk May 7, 2026
5335b65
measure main branch
akifcorduk May 8, 2026
0b04683
test clique changes
akifcorduk May 12, 2026
72bb299
merge clique changes
akifcorduk May 13, 2026
bc5006f
remove deterministic guards
akifcorduk May 13, 2026
3f42c82
clique fixes and common subgraph usage
akifcorduk May 15, 2026
af65630
fix complement bug
akifcorduk May 15, 2026
86e7888
Merge branch 'main_baselin' into zero_half
akifcorduk May 15, 2026
f2004bc
fix compile error
akifcorduk May 15, 2026
3f0ace1
fix omp
akifcorduk May 15, 2026
7995451
with additional fix
akifcorduk May 16, 2026
97e439b
Merge upstream/main into main_baselin
akifcorduk May 17, 2026
8ad61dd
add cuda error recovery for capture
akifcorduk May 20, 2026
0a5149b
test CI
akifcorduk May 20, 2026
06352db
fix logger
akifcorduk May 20, 2026
36e74d2
Merge branch 'main' of github.com:NVIDIA/cuopt into cuda_graph_side_c…
akifcorduk May 20, 2026
4d2fb18
restore the api and use api suitable for <12.3
akifcorduk May 20, 2026
dba39c8
more comments
akifcorduk May 20, 2026
0a4571f
Merge branch 'cuda_graph_side_capture' into main_baselin
akifcorduk May 20, 2026
56b6e84
fix ping pong graph major, non-major logic
akifcorduk May 20, 2026
b83836b
Merge branch 'cuda_graph_side_capture' into main_baselin
akifcorduk May 20, 2026
ce6d499
Merge branch 'main' of github.com:NVIDIA/cuopt into main_Baselin
akifcorduk Jun 1, 2026
4de79a0
fix timer, better jaccard
akifcorduk Jun 2, 2026
a17ffa3
simplify comments
akifcorduk Jun 2, 2026
e5bc991
cut stats
akifcorduk Jun 2, 2026
b5bd4b2
Revert PDLP/PDHG cuda-graph changes to baseline
akifcorduk Jun 2, 2026
947fc63
Merge branch 'main_with_stats' into main_baselin
akifcorduk Jun 2, 2026
c35573a
revery cpu affinity mapping
akifcorduk Jun 2, 2026
85a4024
try without cousin filter
akifcorduk Jun 3, 2026
92d9996
remove cut configs and cousin logic
akifcorduk Jun 3, 2026
14b0ab8
Separate small adjacency-list clique cuts
akifcorduk Jun 3, 2026
ee7f2b5
revert omp inlining
akifcorduk Jun 3, 2026
98b1ee2
remove patch
akifcorduk Jun 3, 2026
59a05ac
handle ai review
akifcorduk Jun 5, 2026
6a75d1e
fix tests
akifcorduk Jun 5, 2026
b3e0eef
fix timer stats
akifcorduk Jun 5, 2026
65591b1
merge clique changes
akifcorduk Jun 5, 2026
03a7b3f
add a skill
akifcorduk Jun 5, 2026
9cfd2b9
more asserts
akifcorduk Jun 5, 2026
b7f2d0b
change implied bound cut order
akifcorduk Jun 5, 2026
4cda3f5
remove debug lines
akifcorduk Jun 8, 2026
1ec6536
clean up debug logs and comments
akifcorduk Jun 8, 2026
61653c4
tidy logs
akifcorduk Jun 8, 2026
79d5a6e
optimize dijstra in-loop allocation and work unit tracking
akifcorduk Jun 8, 2026
9f8d1a4
remove logs and comments
akifcorduk Jun 9, 2026
09bdecd
test the cublas fix
akifcorduk Jun 9, 2026
e39f6db
Revert "test the cublas fix"
akifcorduk Jun 10, 2026
933778a
fix hang and cublas bug
akifcorduk Jun 10, 2026
e246d1f
remove test files
akifcorduk Jun 10, 2026
44a0cfa
merge main and fix branch
akifcorduk Jun 10, 2026
1b162fd
clean up comments and unsused code
akifcorduk Jun 12, 2026
db2526e
Merge branch 'main' of github.com:NVIDIA/cuopt into zero_half
akifcorduk Jun 12, 2026
cfb5f4b
improve test path
akifcorduk Jun 12, 2026
3edceae
handle compile errors
akifcorduk Jun 12, 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
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class mip_solver_settings_t {
i_t knapsack_cuts = -1;
i_t flow_cover_cuts = -1;
i_t clique_cuts = -1;
i_t zero_half_cuts = -1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The corresponding parameter should probably be added to constants.h and solver_settings.cu so that it is exposed to the CLI/hyperparameters like the other cuts

i_t implied_bound_cuts = -1;
i_t strong_chvatal_gomory_cuts = -1;
i_t reduced_cost_strengthening = -1;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/branch_and_bound/branch_and_bound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,7 @@ mip_status_t branch_and_bound_t<i_t, f_t>::solve(mip_solution_t<i_t, f_t>& solut

omp_atomic_t<bool>* clique_signal = &signal_extend_cliques_;

if (settings_.clique_cuts != 0 && clique_table_ == nullptr &&
if ((settings_.clique_cuts != 0 || settings_.zero_half_cuts != 0) && clique_table_ == nullptr &&
omp_get_num_threads() >= CUOPT_MIP_CLIQUE_CUTS_REQUIRED_THREAD_COUNT) {
signal_extend_cliques_.store(false, std::memory_order_release);
typename mip_solver_settings_t<i_t, f_t>::tolerances_t tolerances_for_clique{};
Expand Down
1,197 changes: 1,036 additions & 161 deletions cpp/src/cuts/cuts.cpp

Large diffs are not rendered by default.

57 changes: 55 additions & 2 deletions cpp/src/cuts/cuts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ enum cut_type_t : int8_t {
CHVATAL_GOMORY = 3,
CLIQUE = 4,
IMPLIED_BOUND = 5,
FLOW_COVER = 6,
MAX_CUT_TYPE = 7
ZERO_HALF = 6,
FLOW_COVER = 7,
MAX_CUT_TYPE = 8
};

template <typename f_t>
Expand Down Expand Up @@ -182,6 +183,7 @@ struct cut_info_t {
"Strong CG ",
"Clique ",
"Implied Bounds",
"Zero-Half ",
"Flow Cover "};
std::array<i_t, MAX_CUT_TYPE> num_cuts = {0};
};
Expand Down Expand Up @@ -273,6 +275,16 @@ std::vector<std::vector<int>> find_maximal_cliques_for_test(
int max_calls,
double time_limit);

// Test-only helper to run the production odd-cycle separator used by zero-half cuts.
// adjacency_list must contain local vertex indices in [0, n_vertices). x_values gives
// the LP value for each vertex. Returns simple odd cycles whose induced edge weight
// sum is < 0.5 - min_violation.
std::vector<std::vector<int>> find_violated_odd_cycles_for_test(
const std::vector<std::vector<int>>& adjacency_list,
const std::vector<double>& x_values,
double min_violation,
double time_limit);

template <typename i_t, typename f_t>
class cut_pool_t {
public:
Expand Down Expand Up @@ -581,6 +593,34 @@ class knapsack_generation_t {
template <typename i_t, typename f_t>
class mixed_integer_rounding_cut_t;

template <typename i_t, typename f_t>
class variable_bounds_t;

template <typename i_t, typename f_t>
struct fractional_conflict_subgraph_t {
i_t num_vars{0};
std::vector<i_t> vertices;
std::vector<f_t> weights;
std::vector<i_t> vertex_to_local;
std::vector<char> in_subgraph;
std::vector<std::vector<i_t>> adj_local;
bool ready{false};

i_t num_local() const { return static_cast<i_t>(vertices.size()); }
bool empty_subgraph() const { return vertices.empty(); }

void clear()
{
num_vars = 0;
vertices.clear();
weights.clear();
vertex_to_local.clear();
in_subgraph.clear();
adj_local.clear();
ready = false;
}
};

template <typename i_t, typename f_t>
class cut_generation_t {
public:
Expand Down Expand Up @@ -666,20 +706,33 @@ class cut_generation_t {
const std::vector<f_t>& reduced_costs,
f_t start_time);

// Generate zero-half (odd-cycle / odd-wheel) cuts from the conflict graph
bool generate_zero_half_cuts(const lp_problem_t<i_t, f_t>& lp,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<variable_type_t>& var_types,
const std::vector<f_t>& xstar,
const std::vector<f_t>& reduced_costs,
f_t start_time);

// Generate implied bounds cuts from probing implications
void generate_implied_bound_cuts(const lp_problem_t<i_t, f_t>& lp,
const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<variable_type_t>& var_types,
const std::vector<f_t>& xstar,
f_t start_time);

void prepare_fractional_sub_cg(const simplex_solver_settings_t<i_t, f_t>& settings,
const std::vector<f_t>& xstar,
f_t start_time);

cut_pool_t<i_t, f_t>& cut_pool_;
knapsack_generation_t<i_t, f_t> knapsack_generation_;
flow_cover_generation_t<i_t, f_t> flow_cover_generation_;
const user_problem_t<i_t, f_t>& user_problem_;
const probing_implied_bound_t<i_t, f_t>& probing_implied_bound_;
std::shared_ptr<detail::clique_table_t<i_t, f_t>> clique_table_;
omp_atomic_t<bool>* signal_extend_{nullptr};
fractional_conflict_subgraph_t<i_t, f_t> sub_cg_;
};

template <typename i_t, typename f_t>
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/dual_simplex/simplex_solver_settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct simplex_solver_settings_t {
flow_cover_cuts(-1),
implied_bound_cuts(-1),
clique_cuts(-1),
zero_half_cuts(-1),
strong_chvatal_gomory_cuts(-1),
symmetry(-1),
reduced_cost_strengthening(-1),
Expand Down Expand Up @@ -179,6 +180,7 @@ struct simplex_solver_settings_t {
i_t flow_cover_cuts; // -1 automatic, 0 to disable, >0 to enable flow cover cuts
i_t implied_bound_cuts; // -1 automatic, 0 to disable, >0 to enable implied bound cuts
i_t clique_cuts; // -1 automatic, 0 to disable, >0 to enable clique cuts
i_t zero_half_cuts; // -1 automatic, 0 to disable, >0 to enable zero-half cuts
i_t strong_chvatal_gomory_cuts; // -1 automatic, 0 to disable, >0 to enable strong Chvatal Gomory
// cuts
i_t symmetry; // -1 automatic, 0 to disable, >0 to enable different symmetry methods
Expand Down
1 change: 1 addition & 0 deletions cpp/src/mip_heuristics/diversity/lns/rins.cu
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ void rins_t<i_t, f_t>::run_rins()
branch_and_bound_settings.reliability_branching = 0;
branch_and_bound_settings.max_cut_passes = 0;
branch_and_bound_settings.clique_cuts = 0;
branch_and_bound_settings.zero_half_cuts = 0;
branch_and_bound_settings.sub_mip = 1;
branch_and_bound_settings.strong_branching_simplex_iteration_limit = 200;
branch_and_bound_settings.log.log = false;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/mip_heuristics/diversity/recombiners/sub_mip.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class sub_mip_recombiner_t : public recombiner_t<i_t, f_t> {
branch_and_bound_settings.reliability_branching = 0;
branch_and_bound_settings.max_cut_passes = 0;
branch_and_bound_settings.clique_cuts = 0;
branch_and_bound_settings.zero_half_cuts = 0;
branch_and_bound_settings.sub_mip = 1;
branch_and_bound_settings.strong_branching_simplex_iteration_limit = 200;
branch_and_bound_settings.solution_callback = [this](std::vector<f_t>& solution,
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/mip_heuristics/solver.cu
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define DETECT_SYMMETRY_AFTER_PRESOLVE

#include <mip_heuristics/feasibility_jump/early_cpufj.cuh>
#include <mip_heuristics/presolve/conflict_graph/clique_table.cuh>

#include <raft/sparse/detail/cusparse_wrappers.h>
#include <raft/core/cusparse_macros.hpp>
Expand Down Expand Up @@ -373,6 +374,7 @@ solution_t<i_t, f_t> mip_solver_t<i_t, f_t>::run_solver()
branch_and_bound_settings.flow_cover_cuts = context.settings.flow_cover_cuts;
branch_and_bound_settings.implied_bound_cuts = context.settings.implied_bound_cuts;
branch_and_bound_settings.clique_cuts = context.settings.clique_cuts;
branch_and_bound_settings.zero_half_cuts = context.settings.zero_half_cuts;
branch_and_bound_settings.strong_chvatal_gomory_cuts =
context.settings.strong_chvatal_gomory_cuts;
branch_and_bound_settings.cut_change_threshold = context.settings.cut_change_threshold;
Expand Down Expand Up @@ -425,7 +427,6 @@ solution_t<i_t, f_t> mip_solver_t<i_t, f_t>::run_solver()
std::placeholders::_2);
}

// Create the branch and bound object
branch_and_bound = std::make_unique<dual_simplex::branch_and_bound_t<i_t, f_t>>(
branch_and_bound_problem,
branch_and_bound_settings,
Expand Down
1 change: 0 additions & 1 deletion cpp/src/utilities/omp_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class omp_mutex_t {

omp_mutex_t(omp_mutex_t&& other) { *this = std::move(other); }

omp_mutex_t(const omp_mutex_t&) = delete;
omp_mutex_t& operator=(const omp_mutex_t&) = delete;

omp_mutex_t& operator=(omp_mutex_t&& other)
Expand Down
Loading
Loading