Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
936b7d4
Integrate PSLP presolver
rg20 Jan 22, 2026
9794c93
Fix out of bounds access
rg20 Jan 22, 2026
9ec30ef
Get PSLP from GH
rg20 Jan 23, 2026
baddc0f
Add option for PSLP presolver
rg20 Jan 23, 2026
8d04430
Remove usage of static variables to allow running multiple instances …
rg20 Jan 23, 2026
42f77ea
Use map instead of unordered_map to avoid expensive hashing of floati…
rg20 Jan 26, 2026
1c6d5c2
fix compilation errors
rg20 Jan 29, 2026
43af104
Cleanup CMake logic
rg20 Jan 29, 2026
eda7091
Make debug faster
rg20 Feb 2, 2026
26c651a
Improve hanlding of largest part in coloring
rg20 Feb 2, 2026
781148d
Fix bug in postsolve
rg20 Feb 4, 2026
5ad637b
Enable PSLP presolve by default for large LP problems
rg20 Feb 5, 2026
531b78e
Handle objectie offset correctly
rg20 Feb 5, 2026
02575d6
Merge remote-tracking branch 'upstream/release/26.02' into integrate_…
rg20 Feb 5, 2026
177afe3
Merge remote-tracking branch 'upstream/release/26.02' into integrate_…
rg20 Feb 5, 2026
12cfdaf
Revert changes to run mps script
rg20 Feb 5, 2026
ad32471
Fix compilation errors
rg20 Feb 5, 2026
56cf9f4
Handle infeasibilities from PSLP correctly
rg20 Feb 5, 2026
3df0ad5
Update docs for PSLP
rg20 Feb 5, 2026
b01d5dd
Implement missing function for uncrush_primal when using PSLP
rg20 Feb 5, 2026
62b2e00
Coderabbit suggestion
rg20 Feb 5, 2026
95c417f
Fix coderabbit suggestion
rg20 Feb 5, 2026
a243273
Throw error instead of implementing dummy function
rg20 Feb 5, 2026
95ab168
address coderabbit review comments
rg20 Feb 5, 2026
4d9e10f
Fix a bug in handling the default
rg20 Feb 5, 2026
7f43d95
Add a shorthand for pdlp tolerance
rg20 Feb 5, 2026
e960429
Enable PSLP presolver always for LP
rg20 Feb 5, 2026
b67ca66
Disable presolve for LP relaxation so that there is no regression, an…
rg20 Feb 5, 2026
7b624cd
Add stream syncs after raft copy
rg20 Feb 5, 2026
bb83bfe
Fix up changes to folding
chris-maes Feb 6, 2026
7a49861
Remove total time. Make dual simplex and barrier take into account pr…
chris-maes Feb 6, 2026
aad2736
Print out residual information when dual simplex or barrier wins in c…
chris-maes Feb 6, 2026
edc4ba6
Merge remote-tracking branch 'cuopt-nvidia/release/26.02' into integr…
chris-maes Feb 6, 2026
d6776b4
Optimize adjusting color sum zero
chris-maes Feb 6, 2026
0aaed95
Remove exit(1) that could halt a program
chris-maes Feb 6, 2026
f5e9752
Fix a regression in mip test
rg20 Feb 6, 2026
cb595e3
Merge remote-tracking branch 'upstream/release/26.02' into integrate_…
rg20 Feb 6, 2026
dceac9a
Update Papilo license and add PSLP license
rg20 Feb 6, 2026
528ddea
Fix style
rg20 Feb 6, 2026
01e14bb
Fix logging of presolver info in MIP
rg20 Feb 6, 2026
795227c
Address CodeRabbit comments on folding. Add back comment
chris-maes Feb 6, 2026
6945b50
Add missing \n
chris-maes Feb 6, 2026
78f2877
Merge remote-tracking branch 'cuopt-nvidia/release/26.02' into integr…
chris-maes Feb 6, 2026
3835de5
Fix PDLP tests and add presolve tests
rg20 Feb 6, 2026
1245985
Handle fully reduced problems in presolve
rg20 Feb 6, 2026
9fab0d1
Disable presolve for warmstart test
rg20 Feb 6, 2026
805d7bb
Fix failing tests
rg20 Feb 7, 2026
5d47168
add missing log
rg20 Feb 7, 2026
f02c30f
Make presolve an integer on service side
rg20 Feb 7, 2026
681ffa5
Change presolve type to int in data definitions
rg20 Feb 7, 2026
c071b5e
Cleanup docs
rg20 Feb 7, 2026
8577f04
Fix a corner case in iterative refinement
rg20 Feb 7, 2026
c5196f8
Disable presolve in warmstart example
rg20 Feb 7, 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
12 changes: 11 additions & 1 deletion benchmarks/linear_programming/run_mps_files.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0


Expand Down Expand Up @@ -74,6 +74,7 @@ Optional Arguments:
--n-batches Number of batches
--log-to-console Log to console
--model-list File containing a list of models to run
--pdlp-tolerances Tolerances for PDLP solver (default: 1e-4)
-h, --help Show this help message and exit

Examples:
Expand Down Expand Up @@ -187,6 +188,11 @@ while [[ $# -gt 0 ]]; do
MODEL_LIST="$2"
shift 2
;;
--pdlp-tolerances)
echo "PDLP_TOLERANCES: $2"
PDLP_TOLERANCES="$2"
shift 2
;;
*)
echo "Unknown argument: $1"
print_help
Expand Down Expand Up @@ -214,6 +220,7 @@ BATCH_NUM=${BATCH_NUM:-0}
N_BATCHES=${N_BATCHES:-1}
LOG_TO_CONSOLE=${LOG_TO_CONSOLE:-true}
MODEL_LIST=${MODEL_LIST:-}
PDLP_TOLERANCES=${PDLP_TOLERANCES:-1e-4}

# Validate GPUS_PER_INSTANCE
if [[ "$GPUS_PER_INSTANCE" != "1" && "$GPUS_PER_INSTANCE" != "2" ]]; then
Expand Down Expand Up @@ -413,6 +420,9 @@ worker() {
if [ -n "$METHOD" ]; then
args="$args --method $METHOD"
fi
if [ -n "$PDLP_TOLERANCES" ]; then
args="$args --absolute-primal-tolerance $PDLP_TOLERANCES --absolute-dual-tolerance $PDLP_TOLERANCES --relative-primal-tolerance $PDLP_TOLERANCES --relative-dual-tolerance $PDLP_TOLERANCES --absolute-gap-tolerance $PDLP_TOLERANCES --relative-gap-tolerance $PDLP_TOLERANCES"
fi

CUDA_VISIBLE_DEVICES=$gpu_devices cuopt_cli "$mps_file" --time-limit $TIME_LIMIT $args
done
Expand Down
28 changes: 27 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,24 @@ option(LUSOL "Disable LUSOL" OFF)

FetchContent_MakeAvailable(papilo)

# PSLP - Lightweight C presolver for linear programs
# https://github.com/dance858/PSLP
FetchContent_Declare(
pslp
GIT_REPOSITORY "https://github.com/dance858/PSLP.git"
GIT_TAG "v0.0.4"
GIT_PROGRESS TRUE
EXCLUDE_FROM_ALL
SYSTEM
)

# Build PSLP as static to embed in cuopt (avoids runtime library path issues)
set(BUILD_SHARED_LIBS_SAVED ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
FetchContent_MakeAvailable(pslp)
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_SAVED})


include(${rapids-cmake-dir}/cpm/rapids_logger.cmake)
# generate logging macros
rapids_cpm_rapids_logger(BUILD_EXPORT_SET cuopt-exports INSTALL_EXPORT_SET cuopt-exports)
Expand Down Expand Up @@ -287,7 +305,11 @@ add_library(cuopt::cuopt ALIAS cuopt)
# - include paths ---------------------------------------------------------------------------------
message(STATUS "target include directories CUDSS_INCLUDES = ${CUDSS_INCLUDE}")

target_include_directories(cuopt SYSTEM PRIVATE "${papilo_SOURCE_DIR}/src" "${papilo_BINARY_DIR}")
target_include_directories(cuopt SYSTEM PRIVATE
"${papilo_SOURCE_DIR}/src"
"${papilo_BINARY_DIR}"
"${pslp_SOURCE_DIR}/include"
)

target_include_directories(cuopt
PRIVATE
Expand All @@ -303,6 +325,10 @@ target_include_directories(cuopt
${CUDSS_INCLUDE}
)

# Link PSLP by file to avoid export dependency tracking
target_link_libraries(cuopt PRIVATE $<TARGET_FILE:PSLP>)
add_dependencies(cuopt PSLP)

# ##################################################################################################
# - link libraries --------------------------------------------------------------------------------

Expand Down
5 changes: 5 additions & 0 deletions cpp/include/cuopt/linear_programming/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,9 @@
#define CUOPT_OUT_OF_MEMORY 5
#define CUOPT_RUNTIME_ERROR 6

#define CUOPT_PRESOLVE_DEFAULT -1
#define CUOPT_PRESOLVE_OFF 0
#define CUOPT_PRESOLVE_PAPILO 1
#define CUOPT_PRESOLVE_PSLP 2

#endif // CUOPT_CONSTANTS_H
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class mip_solver_settings_t {
/** Initial primal solutions */
std::vector<std::shared_ptr<rmm::device_uvector<f_t>>> initial_solutions;
bool mip_scaling = false;
bool presolve = true;
presolver_t presolver{presolver_t::Default};
// this is for extracting info from different places of the solver during
// benchmarks
benchmark_info_t* benchmark_info_ptr = nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <cuopt/linear_programming/constants.h>
#include <cuopt/linear_programming/pdlp/pdlp_hyper_params.cuh>
#include <cuopt/linear_programming/pdlp/pdlp_warm_start_data.hpp>
#include <cuopt/linear_programming/utilities/internals.hpp>
#include <optional>
#include <raft/core/device_span.hpp>
#include <rmm/device_uvector.hpp>
Expand Down Expand Up @@ -225,7 +226,7 @@ class pdlp_solver_settings_t {
bool eliminate_dense_columns{true};
bool save_best_primal_so_far{false};
bool first_primal_feasible{false};
bool presolve{false};
presolver_t presolver{presolver_t::Default};
bool dual_postsolve{true};
int num_gpus{1};
method_t method{method_t::Concurrent};
Expand Down
19 changes: 19 additions & 0 deletions cpp/include/cuopt/linear_programming/utilities/internals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <string_view>
#include <type_traits>

#include <cuopt/linear_programming/constants.h>
namespace cuopt {
namespace internals {

Expand Down Expand Up @@ -111,5 +112,23 @@ struct parameter_info_t<std::string> {
std::string default_value;
};

/**
* @brief Enum representing the different presolvers that can be used to solve the
* linear programming problem.
*
* Default: Use the default presolver.
* None: No presolver.
* Papilo: Use the Papilo presolver.
* PSLP: Use the PSLP presolver.
*
* @note Default presolver is None.
*/
enum presolver_t : int {
Default = CUOPT_PRESOLVE_DEFAULT,
None = CUOPT_PRESOLVE_OFF,
Papilo = CUOPT_PRESOLVE_PAPILO,
PSLP = CUOPT_PRESOLVE_PSLP
};

} // namespace linear_programming
} // namespace cuopt
4 changes: 2 additions & 2 deletions cpp/src/dual_simplex/barrier.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1153,14 +1153,14 @@ class iteration_data_t {
}
#ifdef HISTOGRAM
settings.log.printf("Row Nz # rows\n");
for (i_t k = 0; k < m; k++) {
for (i_t k = 0; k < n; k++) {
if (histogram_row[k] > 0) { settings.log.printf("%6d %6d\n", k, histogram_row[k]); }
}
#endif

n_dense_rows = 0;
for (i_t k = 0; k < m; k++) {
if (histogram_row[k] > .1 * n) { n_dense_rows++; }
if (row_nz[k] > .1 * n) { n_dense_rows++; }
}

for (i_t k = 0; k < m; k++) {
Expand Down
Loading