Skip to content

Fix clique size and numerical issue bugs#1589

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
akifcorduk:clique_size_bug
Jul 20, 2026
Merged

Fix clique size and numerical issue bugs#1589
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
akifcorduk:clique_size_bug

Conversation

@akifcorduk

Copy link
Copy Markdown
Contributor

Small cliques are reduced to pairwise conflicts in adj list format and the limit was 512. For some problems, this is too agressive and creates large amount of adj list entries that exceed int32 size. This PR fixes it by reducing the adj list storage threshold to 64.

This PR also fixes a roundoff error that is revealed after extraction of cliques from mixed rows were instroduced. We check with tolerance now.

@akifcorduk akifcorduk added this to the 26.08 milestone Jul 20, 2026
@akifcorduk
akifcorduk requested a review from a team as a code owner July 20, 2026 09:25
@akifcorduk akifcorduk added the bug Something isn't working label Jul 20, 2026
@akifcorduk
akifcorduk requested review from Kh4ster and nguidotti July 20, 2026 09:25
@akifcorduk akifcorduk added the non-breaking Introduces a non-breaking change label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3e14be5e-ff02-42e2-89ee-a4939ed055a8

📥 Commits

Reviewing files that changed from the base of the PR and between 013f87c and 13fd597.

📒 Files selected for processing (2)
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu
  • cpp/tests/mip/cuts_test.cu
🚧 Files skipped from review as they are similar to previous changes (1)
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu

📝 Walkthrough

Walkthrough

Changes

Clique graph updates

Layer / File(s) Summary
CSR storage and clique configuration
cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cuh
CSR offsets and compaction counters use int64_t, while the default minimum clique demotion size changes from 512 to 64.
Tolerance-aware clique construction
cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu, cpp/tests/mip/cuts_test.cu
Clique construction applies absolute RHS tolerance during initial checks and includes a mixed-row roundoff regression test preventing a spurious conflict edge.
Additional-clique tolerance boundary
cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu, cpp/tests/mip/cuts_test.cu
Additional-clique search uses upper_bound and tolerance-adjusted validation, with a regression test for tolerance-boundary conflicts.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: mip

Suggested reviewers: kh4ster, nguidotti, mlubin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main fixes: clique size handling and numerical tolerance issues.
Description check ✅ Passed The description is clearly related to the threshold reduction and tolerance-based roundoff fix in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu`:
- Around line 33-34: The additional-clique path must use the same strict
tolerance boundary as the initial check: update the logic around the lower_bound
handling to reject candidate sums equal to rhs_with_tolerance and proceed only
when the sum is strictly greater. Add a regression test that includes a valid
base clique and reaches the additional-clique path, verifying equality at the
tolerance boundary does not reintroduce the conflict.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 470cbd38-3ffb-4813-97a8-be8db5576eb4

📥 Commits

Reviewing files that changed from the base of the PR and between e4e1aad and 013f87c.

📒 Files selected for processing (3)
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu
  • cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cuh
  • cpp/tests/mip/cuts_test.cu

Comment thread cpp/src/mip_heuristics/presolve/conflict_graph/clique_table.cu

@aliceb-nv aliceb-nv left a comment

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.

Good forward thinking for the int64_t for offsets :) We should probably go over the whole codebase someday to ensure all CSRs use 64bit for the offsets. Perhaps a off_t typedef or such and agentic checks

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

@akifcorduk

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit fe2a8f7 into NVIDIA:main Jul 20, 2026
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants