Skip to content

Clique Table Generation#627

Merged
rapids-bot[bot] merged 99 commits intoNVIDIA:mainfrom
akifcorduk:cliques
Mar 4, 2026
Merged

Clique Table Generation#627
rapids-bot[bot] merged 99 commits intoNVIDIA:mainfrom
akifcorduk:cliques

Conversation

@akifcorduk
Copy link
Contributor

@akifcorduk akifcorduk commented Nov 25, 2025

This PR implements the first part of the paper from the paper: Preprocessing and Cutting Planes with Conflict Graphs.
This part contains only the preprocessing parts and clique cuts will follow in a separate PR:

  • Clique detection by converting constraints into sorted knapsack constraints. This allows fast clique detection.
  • Additional cliques in the same constraint by utilizing sorting structures.
  • Clique extension/merging across the conflict graph.
  • Clique covering and problem modification.

The data structures and query functions are implemented and will be used as a basis for clique cuts and usage in heuristics.

Benchmark results: no impact on benchmarks as this is just the first part, improvements will come from clique cuts.

Summary by CodeRabbit

  • New Features

    • Automatic clique detection and injection into MIP presolve to improve preprocessing.
    • Host-to-solver constraint sync allowing external problem updates to be applied before solving.
  • Improvements

    • Presolve now respects a time cap to bound preprocessing work.
    • Improved constraint handling and propagation during solution setup.
    • Local search initialization refined for more reliable first-run behavior.

@akifcorduk akifcorduk added this to the 26.02 milestone Nov 25, 2025
@akifcorduk akifcorduk added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Nov 25, 2025
@copy-pr-bot
Copy link

copy-pr-bot bot commented Nov 25, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a clique-based presolve subsystem and integrates it into the MIP pipeline, extends CSR sparse-matrix API, exposes a new problem setter for host-derived constraints, adjusts build files, and updates presolve/solver/local-search flows and comments.

Changes

Cohort / File(s) Summary
Build Configuration
cpp/CMakeLists.txt, cpp/src/mip/CMakeLists.txt
Updated solve_MIP include directories (PRIVATE src, PUBLIC BUILD_INTERFACE include) and added clique_table.cu to non-LP build list.
Clique Infrastructure
cpp/src/mip/presolve/conflict_graph/clique_table.cuh, cpp/src/mip/presolve/conflict_graph/clique_table.cu
New templated clique table/types and extensive algorithms for extracting, extending, pruning, and inserting cliques from knapsack-like constraints; explicit instantiations for float/double.
Sparse Matrix API
cpp/src/dual_simplex/sparse_matrix.hpp, cpp/src/dual_simplex/sparse_matrix.cpp
Added csr_matrix_t::get_constraint_range() and insert_row() overloads; added CSC→CSR scatter helper; fixed comment typo and updated copyright year.
Presolve / Diversity Integration
cpp/src/mip/diversity/diversity_manager.cu
Hooked initial-clique finding into run_presolve: construct host_problem, compute initial cliques, update host constraints via set_constraints_from_host_user_problem, reorder/gate bounds updates and trivial presolve.
Probing Cache / Comments
cpp/src/mip/presolve/probing_cache.cu, cpp/src/mip/presolve/probing_cache.cuh
Added unordered_set include; added explanatory comments about probing cache behavior (no API/behavioral changes).
Problem Representation
cpp/src/mip/problem/problem.cuh, cpp/src/mip/problem/problem.cu
Added problem_t::set_constraints_from_host_user_problem(...) to populate device CSR, rhs, bounds, range handling, names, and variable types from a host user_problem; resize_constraints now preserves/initializes prev_dual elements. (Note: duplicate definition observed in cu file.)
Solver Integration
cpp/src/mip/solver.cu
Introduced presolve time cap (min(10% remaining, 60s)) and call to context.problem_ptr->set_constraints_from_host_user_problem(branch_and_bound_problem) before branch-and-bound setup.
Local Search Initialization
cpp/src/mip/local_search/local_search.cu
On first run, initialize in_fj.cstr_weights to constraint count and fill with 1.0.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Clique Table Generation' directly and specifically describes the main feature being added: clique table data structures and generation functionality.
Description check ✅ Passed The pull request description clearly relates to the changeset by explaining the implementation of clique detection, extension, and preprocessing based on a specific paper.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@rg20
Copy link
Contributor

rg20 commented Jan 22, 2026

@akifcorduk is this still relevant?

@rgsl888prabhu rgsl888prabhu changed the base branch from main to release/26.02 January 22, 2026 16:48
@akifcorduk akifcorduk marked this pull request as ready for review January 29, 2026 11:59
@akifcorduk akifcorduk requested review from a team as code owners January 29, 2026 11:59
@akifcorduk akifcorduk changed the title [DO NOT MERGE] Clique Table and Preprocessing Clique Table Generation Mar 4, 2026
@akifcorduk
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0aa1b31 into NVIDIA:main Mar 4, 2026
183 of 185 checks passed
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.

6 participants