Skip to content

Commit 13d7457

Browse files
Merge branch 'main' into conda-limited-api-abi3
2 parents ba01e22 + 5a7fcf9 commit 13d7457

24 files changed

Lines changed: 316 additions & 97 deletions

File tree

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* @nvidia/cuopt-infra-codeowners
33

44
#cpp code owners
5-
cpp/ @nvidia/cuopt-engine-codeowners
6-
benchmarks/ @nvidia/cuopt-engine-codeowners
5+
cpp/ @nvidia/cuopt-solver-codeowners
6+
benchmarks/ @nvidia/cuopt-solver-codeowners
77

88
#python code owners
99
python/ @nvidia/cuopt-infra-codeowners

.github/workflows/pr.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
- '!ci/release/**'
116116
- '!ci/run_*.pytests.sh'
117117
- '!ci/run_ctests.sh'
118+
- '!ci/run-vale.sh'
118119
- '!ci/test_cpp*.sh'
119120
- '!ci/test_notebooks.sh'
120121
- '!ci/test_python.sh'
@@ -175,6 +176,7 @@ jobs:
175176
- '!ci/check_style.sh'
176177
- '!ci/docker/**'
177178
- '!ci/release/**'
179+
- '!ci/run-vale.sh'
178180
- '!ci/test_python.sh'
179181
- '!ci/test_self_hosted_service.sh'
180182
- '!ci/test_wheel*.sh'
@@ -245,6 +247,7 @@ jobs:
245247
- '!ci/check_style.sh'
246248
- '!ci/docker/**'
247249
- '!ci/release/**'
250+
- '!ci/run-vale.sh'
248251
- '!ci/test_self_hosted_service.sh'
249252
- '!ci/test_wheel*.sh'
250253
- '!ci/thirdparty-testing/**'
@@ -315,6 +318,7 @@ jobs:
315318
- '!ci/docker/**'
316319
- '!ci/release/**'
317320
- '!ci/run_ctests.sh'
321+
- '!ci/run-vale.sh'
318322
- '!ci/test_python.sh'
319323
- '!ci/thirdparty-testing/**'
320324
- '!ci/utils/sync_skills_version.sh'

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ repos:
137137
files: ^(VERSION|\.claude-plugin/marketplace\.json|\.cursor-plugin/plugin\.json|gemini-extension\.json)$
138138
- id: vale
139139
name: Vale docs prose lint
140-
entry: vale
140+
entry: ci/run-vale.sh
141+
verbose: true
141142
language: system
143+
# 'pass_filenames: false' prevents pre-commit from invoking 'vale' once per file,
144+
# (instead passes all files at once to 1 invocation)
145+
pass_filenames: false
146+
args: [--output=line, --minAlertLevel=warning, docs/cuopt/source]
147+
# needs to be kept in sync with vale.ini
142148
files: ^docs/cuopt/source/.*\.(rst|md)$
143149
- id: validate-skills
144150
name: Validate agent skills

build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARGS=$*
1414
REPODIR=$(cd "$(dirname "$0")"; pwd)
1515
LIBCUOPT_BUILD_DIR=${LIBCUOPT_BUILD_DIR:=${REPODIR}/cpp/build}
1616

17-
VALIDARGS="clean codegen libcuopt cuopt_grpc_server cuopt cuopt_server cuopt_sh_client docs deb -a -b -g -fsanitize -tsan -msan -v -l= --verbose-pdlp --build-lp-only --no-fetch-rapids --skip-c-python-adapters --skip-tests-build --skip-routing-build --skip-grpc-build --skip-fatbin-write --host-lineinfo [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] --install --allgpuarch --ci-only-arch --show_depr_warn -h --help"
17+
VALIDARGS="clean codegen libcuopt cuopt_grpc_server cuopt cuopt_server cuopt_sh_client docs deb -a -b -g -fsanitize -tsan -msan -v -l= --verbose-pdlp --build-lp-only --no-fetch-rapids --skip-c-python-adapters --skip-tests-build --skip-routing-build --skip-grpc-build --skip-fatbin-write --host-lineinfo --split-compile [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] --install --allgpuarch --ci-only-arch --show_depr_warn -h --help"
1818
HELP="$0 [<target> ...] [<flag> ...]
1919
where <target> is:
2020
clean - remove all existing build artifacts and configuration (start over)
@@ -45,6 +45,7 @@ HELP="$0 [<target> ...] [<flag> ...]
4545
--skip-grpc-build - skip building gRPC and protobuf components (auto-enabled with -tsan)
4646
--skip-fatbin-write - skip the fatbin write
4747
--host-lineinfo - build with debug line information for host code
48+
--split-compile - opt in to nvcc split compilation; builds may be nondeterministic
4849
--cache-tool=<tool> - pass the build cache tool (eg: ccache, sccache, distcc) that will be used
4950
to speedup the build process.
5051
--cmake-args=\\\"<args>\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument)
@@ -260,6 +261,11 @@ fi
260261
if hasArg --host-lineinfo; then
261262
HOST_LINEINFO=1
262263
fi
264+
if hasArg --split-compile; then
265+
# nvcc split compilation can produce nondeterministic cuOpt builds, so keep it opt-in.
266+
echo "WARNING: nvcc split compilation may produce nondeterministic cuOpt builds."
267+
export NVCC_PREPEND_FLAGS="${NVCC_PREPEND_FLAGS:+${NVCC_PREPEND_FLAGS} }--split-compile=0"
268+
fi
263269

264270
function contains_string {
265271
local search_string="$1"

ci/build_wheel_cuopt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ EXCLUDE_ARGS=(
4141
--exclude "libcusolver.so.*"
4242
--exclude "libcusparse.so.*"
4343
--exclude "libcuopt.so"
44+
--exclude "libnvJitLink.so*"
4445
--exclude "librapids_logger.so"
4546
--exclude "librmm.so"
4647
)

ci/build_wheel_libcuopt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ EXCLUDE_ARGS=(
103103
--exclude "libcusolver.so.*"
104104
--exclude "libcusparse.so.*"
105105
--exclude "libnccl.so.*"
106-
--exclude "libnvJitLink*"
106+
--exclude "libnvJitLink.so*"
107107
--exclude "librapids_logger.so"
108108
--exclude "librmm.so"
109109
# OpenSSL 3 is intentionally NOT bundled. Resolving libssl.so.3 / libcrypto.so.3

ci/run-vale.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -euo pipefail
7+
8+
if ! command -v vale &>/dev/null; then
9+
if [[ "${CI:-}" != "true" ]]; then
10+
echo "WARNING: vale not found — skipping prose lint. Install 'vale' to run this check locally." >&2
11+
exit 0
12+
fi
13+
echo "ERROR: vale not found and CI=true." >&2
14+
exit 1
15+
fi
16+
17+
exec vale "$@"

cpp/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ endif ()
190190
# Add jobserver flags for parallel compilation if PARALLEL_LEVEL is set
191191
if (PARALLEL_LEVEL AND NOT "${PARALLEL_LEVEL}" STREQUAL "")
192192
message(STATUS "Enabling nvcc parallel compilation support")
193-
list(APPEND CUOPT_CUDA_FLAGS --threads=0 --split-compile=0)
193+
list(APPEND CUOPT_CUDA_FLAGS --threads=0)
194194
if (USE_NVCC_JOBSERVER AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
195195
message(STATUS "Enabling nvcc jobserver support (NVCC >= 13.0)")
196196
list(APPEND CUOPT_CUDA_FLAGS --jobserver)
@@ -295,7 +295,7 @@ FetchContent_MakeAvailable(papilo)
295295
FetchContent_Declare(
296296
pslp
297297
GIT_REPOSITORY "https://github.com/dance858/PSLP.git"
298-
GIT_TAG "v0.0.10"
298+
GIT_TAG "v0.0.11"
299299
GIT_PROGRESS TRUE
300300
EXCLUDE_FROM_ALL
301301
SYSTEM
@@ -495,12 +495,6 @@ set(CUOPT_SRC_FILES)
495495
set(MPS_FAST_SRC_FILES)
496496
add_subdirectory(src)
497497

498-
# nvcc 13.0.3 ICE (signal 11) compiling sliding_window.cu with 7 GPU architectures;
499-
# --split-compile breaks the codegen into per-arch sub-jobs to avoid the crash
500-
set_source_files_properties(
501-
${CMAKE_CURRENT_SOURCE_DIR}/src/routing/local_search/sliding_window.cu
502-
PROPERTIES COMPILE_OPTIONS "--split-compile=0")
503-
504498
if (HOST_LINEINFO)
505499
set_source_files_properties(${CUOPT_SRC_FILES} DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTIES COMPILE_OPTIONS "-g1")
506500
endif ()

cpp/include/cuopt/mathematical_optimization/constants.h

Lines changed: 63 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -20,68 +20,69 @@
2020
#define CUOPT_INSTANTIATE_INT64 0
2121

2222
/* @brief LP/MIP parameter string constants */
23-
#define CUOPT_ABSOLUTE_DUAL_TOLERANCE "absolute_dual_tolerance"
24-
#define CUOPT_RELATIVE_DUAL_TOLERANCE "relative_dual_tolerance"
25-
#define CUOPT_ABSOLUTE_PRIMAL_TOLERANCE "absolute_primal_tolerance"
26-
#define CUOPT_RELATIVE_PRIMAL_TOLERANCE "relative_primal_tolerance"
27-
#define CUOPT_ABSOLUTE_GAP_TOLERANCE "absolute_gap_tolerance"
28-
#define CUOPT_RELATIVE_GAP_TOLERANCE "relative_gap_tolerance"
29-
#define CUOPT_INFEASIBILITY_DETECTION "infeasibility_detection"
30-
#define CUOPT_STRICT_INFEASIBILITY "strict_infeasibility"
31-
#define CUOPT_PRIMAL_INFEASIBLE_TOLERANCE "primal_infeasible_tolerance"
32-
#define CUOPT_DUAL_INFEASIBLE_TOLERANCE "dual_infeasible_tolerance"
33-
#define CUOPT_ITERATION_LIMIT "iteration_limit"
34-
#define CUOPT_TIME_LIMIT "time_limit"
35-
#define CUOPT_WORK_LIMIT "work_limit"
36-
#define CUOPT_NODE_LIMIT "node_limit"
37-
#define CUOPT_PDLP_SOLVER_MODE "pdlp_solver_mode"
38-
#define CUOPT_METHOD "method"
39-
#define CUOPT_PER_CONSTRAINT_RESIDUAL "per_constraint_residual"
40-
#define CUOPT_SAVE_BEST_PRIMAL_SO_FAR "save_best_primal_so_far"
41-
#define CUOPT_FIRST_PRIMAL_FEASIBLE "first_primal_feasible"
42-
#define CUOPT_LOG_FILE "log_file"
43-
#define CUOPT_LOG_TO_CONSOLE "log_to_console"
44-
#define CUOPT_CROSSOVER "crossover"
45-
#define CUOPT_FOLDING "folding"
46-
#define CUOPT_AUGMENTED "augmented"
47-
#define CUOPT_DUALIZE "dualize"
48-
#define CUOPT_ORDERING "ordering"
49-
#define CUOPT_BARRIER_DUAL_INITIAL_POINT "barrier_dual_initial_point"
50-
#define CUOPT_POSTSOLVE_INFO "postsolve_info"
51-
#define CUOPT_BARRIER_ITERATIVE_REFINEMENT "barrier_iterative_refinement"
52-
#define CUOPT_BARRIER_STEP_SCALE "barrier_step_scale"
53-
#define CUOPT_ELIMINATE_DENSE_COLUMNS "eliminate_dense_columns"
54-
#define CUOPT_CUDSS_DETERMINISTIC "cudss_deterministic"
55-
#define CUOPT_PRESOLVE "presolve"
56-
#define CUOPT_MIP_PROBING "mip_probing"
57-
#define CUOPT_DUAL_POSTSOLVE "dual_postsolve"
58-
#define CUOPT_MIP_DETERMINISM_MODE "mip_determinism_mode"
59-
#define CUOPT_MIP_ABSOLUTE_TOLERANCE "mip_absolute_tolerance"
60-
#define CUOPT_MIP_RELATIVE_TOLERANCE "mip_relative_tolerance"
61-
#define CUOPT_MIP_INTEGRALITY_TOLERANCE "mip_integrality_tolerance"
62-
#define CUOPT_MIP_ABSOLUTE_GAP "mip_absolute_gap"
63-
#define CUOPT_MIP_RELATIVE_GAP "mip_relative_gap"
64-
#define CUOPT_MIP_HEURISTICS_ONLY "mip_heuristics_only"
65-
#define CUOPT_MIP_SCALING "mip_scaling"
66-
#define CUOPT_MIP_PRESOLVE "mip_presolve"
67-
#define CUOPT_MIP_SYMMETRY "mip_symmetry"
68-
#define CUOPT_MIP_RELIABILITY_BRANCHING "mip_reliability_branching"
69-
#define CUOPT_MIP_CUT_PASSES "mip_cut_passes"
70-
#define CUOPT_MIP_MIXED_INTEGER_ROUNDING_CUTS "mip_mixed_integer_rounding_cuts"
71-
#define CUOPT_MIP_MIXED_INTEGER_GOMORY_CUTS "mip_mixed_integer_gomory_cuts"
72-
#define CUOPT_MIP_KNAPSACK_CUTS "mip_knapsack_cuts"
73-
#define CUOPT_MIP_FLOW_COVER_CUTS "mip_flow_cover_cuts"
74-
#define CUOPT_MIP_IMPLIED_BOUND_CUTS "mip_implied_bound_cuts"
75-
#define CUOPT_MIP_CLIQUE_CUTS "mip_clique_cuts"
76-
#define CUOPT_MIP_ZERO_HALF_CUTS "mip_zero_half_cuts"
77-
#define CUOPT_MIP_STRONG_CHVATAL_GOMORY_CUTS "mip_strong_chvatal_gomory_cuts"
78-
#define CUOPT_MIP_REDUCED_COST_STRENGTHENING "mip_reduced_cost_strengthening"
79-
#define CUOPT_MIP_RINS "mip_rins"
80-
#define CUOPT_MIP_OBJECTIVE_STEP "mip_objective_step"
81-
#define CUOPT_MIP_CUT_CHANGE_THRESHOLD "mip_cut_change_threshold"
82-
#define CUOPT_MIP_CUT_MIN_ORTHOGONALITY "mip_cut_min_orthogonality"
83-
#define CUOPT_MIP_BATCH_PDLP_STRONG_BRANCHING "mip_batch_pdlp_strong_branching"
84-
#define CUOPT_MIP_BATCH_PDLP_RELIABILITY_BRANCHING "mip_batch_pdlp_reliability_branching"
23+
#define CUOPT_ABSOLUTE_DUAL_TOLERANCE "absolute_dual_tolerance"
24+
#define CUOPT_RELATIVE_DUAL_TOLERANCE "relative_dual_tolerance"
25+
#define CUOPT_ABSOLUTE_PRIMAL_TOLERANCE "absolute_primal_tolerance"
26+
#define CUOPT_RELATIVE_PRIMAL_TOLERANCE "relative_primal_tolerance"
27+
#define CUOPT_ABSOLUTE_GAP_TOLERANCE "absolute_gap_tolerance"
28+
#define CUOPT_RELATIVE_GAP_TOLERANCE "relative_gap_tolerance"
29+
#define CUOPT_INFEASIBILITY_DETECTION "infeasibility_detection"
30+
#define CUOPT_STRICT_INFEASIBILITY "strict_infeasibility"
31+
#define CUOPT_PRIMAL_INFEASIBLE_TOLERANCE "primal_infeasible_tolerance"
32+
#define CUOPT_DUAL_INFEASIBLE_TOLERANCE "dual_infeasible_tolerance"
33+
#define CUOPT_ITERATION_LIMIT "iteration_limit"
34+
#define CUOPT_TIME_LIMIT "time_limit"
35+
#define CUOPT_WORK_LIMIT "work_limit"
36+
#define CUOPT_NODE_LIMIT "node_limit"
37+
#define CUOPT_PDLP_SOLVER_MODE "pdlp_solver_mode"
38+
#define CUOPT_METHOD "method"
39+
#define CUOPT_PER_CONSTRAINT_RESIDUAL "per_constraint_residual"
40+
#define CUOPT_SAVE_BEST_PRIMAL_SO_FAR "save_best_primal_so_far"
41+
#define CUOPT_FIRST_PRIMAL_FEASIBLE "first_primal_feasible"
42+
#define CUOPT_LOG_FILE "log_file"
43+
#define CUOPT_LOG_TO_CONSOLE "log_to_console"
44+
#define CUOPT_CROSSOVER "crossover"
45+
#define CUOPT_FOLDING "folding"
46+
#define CUOPT_AUGMENTED "augmented"
47+
#define CUOPT_DUALIZE "dualize"
48+
#define CUOPT_ORDERING "ordering"
49+
#define CUOPT_BARRIER_DUAL_INITIAL_POINT "barrier_dual_initial_point"
50+
#define CUOPT_POSTSOLVE_INFO "postsolve_info"
51+
#define CUOPT_BARRIER_PRESOLVE_BOUND_FREE_VARIABLES "barrier_presolve_bound_free_variables"
52+
#define CUOPT_BARRIER_ITERATIVE_REFINEMENT "barrier_iterative_refinement"
53+
#define CUOPT_BARRIER_STEP_SCALE "barrier_step_scale"
54+
#define CUOPT_ELIMINATE_DENSE_COLUMNS "eliminate_dense_columns"
55+
#define CUOPT_CUDSS_DETERMINISTIC "cudss_deterministic"
56+
#define CUOPT_PRESOLVE "presolve"
57+
#define CUOPT_MIP_PROBING "mip_probing"
58+
#define CUOPT_DUAL_POSTSOLVE "dual_postsolve"
59+
#define CUOPT_MIP_DETERMINISM_MODE "mip_determinism_mode"
60+
#define CUOPT_MIP_ABSOLUTE_TOLERANCE "mip_absolute_tolerance"
61+
#define CUOPT_MIP_RELATIVE_TOLERANCE "mip_relative_tolerance"
62+
#define CUOPT_MIP_INTEGRALITY_TOLERANCE "mip_integrality_tolerance"
63+
#define CUOPT_MIP_ABSOLUTE_GAP "mip_absolute_gap"
64+
#define CUOPT_MIP_RELATIVE_GAP "mip_relative_gap"
65+
#define CUOPT_MIP_HEURISTICS_ONLY "mip_heuristics_only"
66+
#define CUOPT_MIP_SCALING "mip_scaling"
67+
#define CUOPT_MIP_PRESOLVE "mip_presolve"
68+
#define CUOPT_MIP_SYMMETRY "mip_symmetry"
69+
#define CUOPT_MIP_RELIABILITY_BRANCHING "mip_reliability_branching"
70+
#define CUOPT_MIP_CUT_PASSES "mip_cut_passes"
71+
#define CUOPT_MIP_MIXED_INTEGER_ROUNDING_CUTS "mip_mixed_integer_rounding_cuts"
72+
#define CUOPT_MIP_MIXED_INTEGER_GOMORY_CUTS "mip_mixed_integer_gomory_cuts"
73+
#define CUOPT_MIP_KNAPSACK_CUTS "mip_knapsack_cuts"
74+
#define CUOPT_MIP_FLOW_COVER_CUTS "mip_flow_cover_cuts"
75+
#define CUOPT_MIP_IMPLIED_BOUND_CUTS "mip_implied_bound_cuts"
76+
#define CUOPT_MIP_CLIQUE_CUTS "mip_clique_cuts"
77+
#define CUOPT_MIP_ZERO_HALF_CUTS "mip_zero_half_cuts"
78+
#define CUOPT_MIP_STRONG_CHVATAL_GOMORY_CUTS "mip_strong_chvatal_gomory_cuts"
79+
#define CUOPT_MIP_REDUCED_COST_STRENGTHENING "mip_reduced_cost_strengthening"
80+
#define CUOPT_MIP_RINS "mip_rins"
81+
#define CUOPT_MIP_OBJECTIVE_STEP "mip_objective_step"
82+
#define CUOPT_MIP_CUT_CHANGE_THRESHOLD "mip_cut_change_threshold"
83+
#define CUOPT_MIP_CUT_MIN_ORTHOGONALITY "mip_cut_min_orthogonality"
84+
#define CUOPT_MIP_BATCH_PDLP_STRONG_BRANCHING "mip_batch_pdlp_strong_branching"
85+
#define CUOPT_MIP_BATCH_PDLP_RELIABILITY_BRANCHING "mip_batch_pdlp_reliability_branching"
8586
#define CUOPT_MIP_STRONG_BRANCHING_SIMPLEX_ITERATION_LIMIT \
8687
"mip_strong_branching_simplex_iteration_limit"
8788

cpp/include/cuopt/mathematical_optimization/pdlp/solver_settings.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ class pdlp_solver_settings_t {
296296
i_t ordering{-1};
297297
i_t barrier_dual_initial_point{-1};
298298
i_t postsolve_info{-1};
299+
i_t barrier_presolve_bound_free_variables{-1}; // -1 automatic, 0 disabled, 1 enabled
299300
// Ruiz equilibration for QCQP (barrier) scaling: -1 automatic (row/column
300301
// imbalance heuristic), 0 disabled, 1 enabled. Distinct from PDLP's own Ruiz
301302
// scaling in pdlp_hyper_params_t.

0 commit comments

Comments
 (0)