-
Notifications
You must be signed in to change notification settings - Fork 222
Make MIP root relaxation honor LP method #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -570,7 +570,7 @@ solution_t<i_t, f_t> diversity_manager_t<i_t, f_t>::run_solver() | |
| 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.method = context.settings.method; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- applicable repository guidance ---'
head -5 /tmp/coderabbit-repo-knowledge/nvidia-cuopt-f5e5051e/*/*.md 2>/dev/null || true
printf '%s\n' '--- changed hunk ---'
git diff -- cpp/src/mip_heuristics/diversity/diversity_manager.cu | sed -n '1,180p'
printf '%s\n' '--- surrounding implementation ---'
sed -n '500,640p' cpp/src/mip_heuristics/diversity/diversity_manager.cu
printf '%s\n' '--- directly bound symbols ---'
rg -n -S 'solve_lp_with_method|set_root_concurrent_halt|concurrent_halt|method_t::(Barrier|Concurrent)|enum class method_t|method_t' cpp/src/mip_heuristics cpp/src/tests | head -240Repository: NVIDIA/cuopt Length of output: 24626 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- scoped guidance and learning ---'
cat /tmp/coderabbit-repo-knowledge/nvidia-cuopt-f5e5051e/conventions/cpp-src.md
cat /tmp/coderabbit-repo-knowledge/nvidia-cuopt-f5e5051e/conventions/cpp-tests.md
cat /tmp/coderabbit-repo-knowledge/nvidia-cuopt-f5e5051e/learnings/cpp-src-mip-heuristics-diversity.md
printf '%s\n' '--- remaining root-LP flow ---'
sed -n '620,690p' cpp/src/mip_heuristics/diversity/diversity_manager.cu
printf '%s\n' '--- method dispatcher and settings definitions ---'
rg -n -S -g '*.{cu,cuh,cpp,hpp,h}' 'solve_lp_with_method|pdlp_solver_settings_t|enum class method_t|method_t\s*=' cpp/src cpp/include | head -160
printf '%s\n' '--- root concurrent wait and callback symbols ---'
rg -n -S -g '*.{cu,cuh,cpp,hpp,h}' 'set_root_concurrent_halt|root_concurrent|concurrent_halt|relaxed_solution|simplex_solution_exists' cpp/src cpp/include | head -240
printf '%s\n' '--- available test locations ---'
fd -t f -i 'test' cpp | head -120Repository: NVIDIA/cuopt Length of output: 50011 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- method enum and settings contract ---'
sed -n '80,145p' cpp/include/cuopt/mathematical_optimization/pdlp/solver_settings.hpp
sed -n '325,355p' cpp/include/cuopt/mathematical_optimization/pdlp/solver_settings.hpp
printf '%s\n' '--- solve_lp_with_method implementation ---'
sed -n '450,635p' cpp/src/pdlp/solve.cu
sed -n '1780,1845p' cpp/src/pdlp/solve.cu
printf '%s\n' '--- B&B root-relaxation handoff and wait ---'
sed -n '3025,3120p' cpp/src/branch_and_bound/branch_and_bound.cpp
printf '%s\n' '--- callback declaration and implementation ---'
rg -n -S -g '*.{cu,cuh,cpp,hpp,h}' 'set_root_relaxation_solution_callback|root_crossover_solution_set_' cpp/src cpp/includeRepository: NVIDIA/cuopt Length of output: 22155 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- method_t declaration and defaults ---'
rg -n -B8 -A18 'enum class method_t|enum method_t|method_t\s*\{' cpp/include cpp/src
printf '%s\n' '--- concurrent dispatcher and status selection ---'
sed -n '1450,1710p' cpp/src/pdlp/solve.cu
printf '%s\n' '--- root callback type and setter ---'
sed -n '245,285p' cpp/src/mip_heuristics/problem/problem.cuh
sed -n '105,145p' cpp/src/branch_and_bound/branch_and_bound.hpp
printf '%s\n' '--- post-wait root-relaxation behavior ---'
sed -n '3110,3185p' cpp/src/branch_and_bound/branch_and_bound.cpp
printf '%s\n' '--- root LP setup and callback binding ---'
sed -n '430,480p' cpp/src/mip_heuristics/solver.cuRepository: NVIDIA/cuopt Length of output: 24502 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- concurrent result selection ---'
sed -n '1660,1815p' cpp/src/pdlp/solve.cu
printf '%s\n' '--- root solve call and settings ---'
sed -n '2980,3070p' cpp/src/branch_and_bound/branch_and_bound.cpp
printf '%s\n' '--- solution/status representation ---'
rg -n -S -g '*.{cu,cuh,cpp,hpp,h}' 'struct lp_solution_t|class lp_solution_t|lp_solution_t\(' cpp/src cpp/include | head -80
printf '%s\n' '--- existing relevant tests ---'
rg -n -S -g '*.{cu,cpp,hpp,h}' 'method_t::(Barrier|Concurrent)|CUOPT_METHOD_BARRIER|set_root_relaxation_solution|root.*relax|NumericalError|TimeLimit' cpp/tests | head -220
printf '%s\n' '--- change summary ---'
git status --short
git diff --statRepository: NVIDIA/cuopt Length of output: 14815 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- LP solution storage and status conversion ---'
cat -n cpp/src/dual_simplex/solution.hpp | sed -n '1,90p'
rg -n -A55 -B12 'convert_dual_simplex_sol\(' cpp/src/pdlp/solve.cu | head -150
printf '%s\n' '--- barrier time-limit and numerical-status paths ---'
rg -n -A18 -B12 'TIME_LIMIT|NUMERICAL|NUMERICAL_ISSUES|TimeLimit' cpp/src/barrier cpp/src/dual_simplex cpp/src/pdlp/solve.cu | head -220
printf '%s\n' '--- MIP test registration context ---'
sed -n '1,180p' cpp/tests/mip/termination_test.cuRepository: NVIDIA/cuopt Length of output: 32075 Add MIP regression coverage for configured root-LP methods. Add gtest coverage for 🤖 Prompt for AI AgentsSource: Path instructions |
||
| pdlp_settings.inside_mip = true; | ||
| pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable2; | ||
| pdlp_settings.num_gpus = context.settings.num_gpus; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: NVIDIA/cuopt
Length of output: 42945
🏁 Script executed:
Repository: NVIDIA/cuopt
Length of output: 50368
🏁 Script executed:
Repository: NVIDIA/cuopt
Length of output: 29577
Add a gtest for the
CUOPT_METHODregistration.Test the concurrent default, propagation to both PDLP and MIP settings, and rejection of values outside the configured range.
🤖 Prompt for AI Agents
Source: Coding guidelines