Skip to content

GF2 presolve rank-deficiency fix - #1660

Open
aliceb-nv wants to merge 3 commits into
NVIDIA:mainfrom
aliceb-nv:gf2-rankdeficient-fix
Open

GF2 presolve rank-deficiency fix#1660
aliceb-nv wants to merge 3 commits into
NVIDIA:mainfrom
aliceb-nv:gf2-rankdeficient-fix

Conversation

@aliceb-nv

Copy link
Copy Markdown
Contributor

The GF(2) presolver treated a missing pivot column as proof of infeasibility, so rank-deficient but consistent GF2 blocks were wrongly reported infeasible. It now runs a full RREF that separates inconsistency from underdetermination and fixes only variables whose value is identical in every solution.

The GF2 presolver also now supports rectangular matrices, and test coverage has been expanded.

Description

Issue

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

@aliceb-nv aliceb-nv added this to the 26.10 milestone Aug 4, 2026
@aliceb-nv
aliceb-nv requested review from a team as code owners August 4, 2026 17:38
@aliceb-nv
aliceb-nv requested a review from tmckayus August 4, 2026 17:38
@aliceb-nv aliceb-nv added the bug Something isn't working label Aug 4, 2026
@aliceb-nv
aliceb-nv requested review from kaatish and rg20 August 4, 2026 17:38
@copy-pr-bot

copy-pr-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@aliceb-nv

Copy link
Copy Markdown
Contributor Author

/ok to test 1e6415d

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR replaces the square GF(2) solver with a rectangular rank-aware implementation, adds validated presolve fixings and extensive coverage, and introduces optional Papilo reduction-method allowlists for main and simplex-subproblem presolve paths.

Changes

GF(2) presolve

Layer / File(s) Summary
Rectangular GF(2) solver contract
cpp/src/mip_heuristics/presolve/gf2_presolve.hpp, cpp/src/mip_heuristics/presolve/gf2_presolve.cpp
Adds gf2_status_t and a packed-bit RREF solver with infeasibility and variable-determination results.
Validated GF(2) presolve fixings
cpp/src/mip_heuristics/presolve/gf2_presolve.cpp
Validates key mappings, supports differing matrix dimensions, applies uniquely determined binary fixings, and checks residuals, conflicts, and bounds.
GF(2) solver and presolve validation
cpp/tests/mip/gf2_presolve_test.cpp, cpp/tests/internal/CMakeLists.txt, cpp/tests/mip/presolve_test.cu
Adds exhaustive, randomized, permutation, rectangular, singular, conflict, and bounds tests. Removes the obsolete compact-index test.

Papilo reduction allowlist

Layer / File(s) Summary
Papilo allowlist configuration
cpp/src/mip_heuristics/presolve/third_party_presolve.hpp, cpp/src/mip_heuristics/presolve/third_party_presolve.cpp
Adds optional allowlist storage and filters Papilo methods and method-specific parameters.
Papilo presolve call-site wiring
cpp/src/mip_heuristics/presolve/third_party_presolve.cpp
Passes reduction_allowlist_ through the main and simplex-subproblem presolve paths.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • NVIDIA/cuopt#1657: Implements the same GF(2) solver and presolve changes, Papilo allowlist, and test updates.

Suggested labels: non-breaking

Suggested reviewers: tmckayus, chris-maes, mlubin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main GF(2) presolve rank-deficiency fix.
Description check ✅ Passed The description accurately explains the GF(2) presolver fix, rectangular support, and expanded test coverage.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

🧹 Nitpick comments (1)
cpp/tests/mip/gf2_presolve_test.cpp (1)

523-542: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Align the test name and comment with the asserted status.

The test is named more_rows_than_bins_reduces and the comment says the third row is redundant, but the assertion expects OPTIMAL, not REDUCED. The presolver fully solves this instance, so OPTIMAL is the real outcome. Rename the test to reflect that, or state in the comment why presolve reaches OPTIMAL here. This keeps a future reader from treating an OPTIMAL-to-REDUCED change as a test bug.

🤖 Prompt for 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.

In `@cpp/tests/mip/gf2_presolve_test.cpp` around lines 523 - 542, Rename the test
`more_rows_than_bins_reduces` to reflect that presolve fully solves the instance
with `OPTIMAL`, and update the comment so it no longer describes only a
redundant row without explaining the optimal outcome.
🤖 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.

Nitpick comments:
In `@cpp/tests/mip/gf2_presolve_test.cpp`:
- Around line 523-542: Rename the test `more_rows_than_bins_reduces` to reflect
that presolve fully solves the instance with `OPTIMAL`, and update the comment
so it no longer describes only a redundant row without explaining the optimal
outcome.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0a583e30-9d20-488e-b0ca-9142b3365d5c

📥 Commits

Reviewing files that changed from the base of the PR and between 2f035ba and 1e6415d.

📒 Files selected for processing (7)
  • cpp/src/mip_heuristics/presolve/gf2_presolve.cpp
  • cpp/src/mip_heuristics/presolve/gf2_presolve.hpp
  • cpp/src/mip_heuristics/presolve/third_party_presolve.cpp
  • cpp/src/mip_heuristics/presolve/third_party_presolve.hpp
  • cpp/tests/internal/CMakeLists.txt
  • cpp/tests/mip/gf2_presolve_test.cpp
  • cpp/tests/mip/presolve_test.cu
💤 Files with no reviewable changes (1)
  • cpp/tests/mip/presolve_test.cu

@aliceb-nv aliceb-nv added the non-breaking Introduces a non-breaking change label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) 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.

1 participant