Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4123263
First stab at barrier
chris-maes Aug 4, 2025
da03c9d
add cudss
rgsl888prabhu Aug 5, 2025
10dadaa
enable cudss in cmake
rgsl888prabhu Aug 5, 2025
6a16136
Merge branch 'branch-25.10' of github.com:nvidia/cuopt into add_cudss
rgsl888prabhu Aug 5, 2025
69f2b05
First partially working version. You can switch between CHOLMOD and c…
chris-maes Aug 6, 2025
c50e99c
Update cmake
rgsl888prabhu Aug 6, 2025
4ebf2f9
install cudss
rgsl888prabhu Aug 7, 2025
d1f9c14
Now optimal/suboptimal on 89/93 NETLIB LPs with cuDSS
chris-maes Aug 8, 2025
edf3208
Merge branch 'branch-25.10' into barrier
chris-maes Aug 8, 2025
999b690
Remove CHOLMOD experiment
chris-maes Aug 8, 2025
8e1f510
fix wheel
rgsl888prabhu Aug 12, 2025
7e69161
Merge branch 'branch-25.10' into add_cudss
rgsl888prabhu Aug 12, 2025
2fdb899
remove run export
rgsl888prabhu Aug 12, 2025
17a6a2b
add config
rgsl888prabhu Aug 13, 2025
793199c
Relative tolerance and new mu in corrector step
chris-maes Aug 13, 2025
b765e3b
Return suboptimal if corrector step fails
chris-maes Aug 13, 2025
67c81a6
Style fixes
chris-maes Aug 13, 2025
fe25ee8
update installation
rgsl888prabhu Aug 13, 2025
dd699a7
add install cudss script
rgsl888prabhu Aug 13, 2025
bd62c3b
Use settings.log to capture output to logfile
chris-maes Aug 13, 2025
6fca5ad
fix style
rgsl888prabhu Aug 13, 2025
b887b96
Hook up status codes
chris-maes Aug 13, 2025
cfb637b
fix Cmake
rgsl888prabhu Aug 13, 2025
f75bed2
fix issues
rgsl888prabhu Aug 13, 2025
b00dcc3
fix issues
rgsl888prabhu Aug 13, 2025
63ca529
Add support for crossover after barrier
chris-maes Aug 13, 2025
b63de80
fix cmake
rgsl888prabhu Aug 13, 2025
36b2cbf
fix path to libcudss
rgsl888prabhu Aug 14, 2025
bb7e38c
update
rgsl888prabhu Aug 14, 2025
cdea38b
Merge branch 'branch-25.10' into add_cudss
rgsl888prabhu Aug 14, 2025
859f15f
Add support for concurrent barrier
chris-maes Aug 14, 2025
7deeac8
Update pyproject.toml
rgsl888prabhu Aug 14, 2025
4637704
Merge branch 'branch-25.10' into barrier
chris-maes Aug 14, 2025
25f5b45
Merge branch 'barrier' of github.com:chris-maes/cuopt into cudss_and_…
rgsl888prabhu Aug 14, 2025
3410e86
style
rgsl888prabhu Aug 14, 2025
5599ceb
Add in concurrent checks. Fix broken assert
chris-maes Aug 15, 2025
2d28878
Merge branch 'barrier' of github.com:chris-maes/cuopt into cudss_and_…
rgsl888prabhu Aug 18, 2025
6d1bc10
Merge branch 'branch-25.10' into cudss_and_chris_pr
rgsl888prabhu Aug 18, 2025
89cbe2a
fix issue
rgsl888prabhu Aug 18, 2025
8e74b52
Merge branch 'branch-25.10' into cudss_and_chris_pr
rgsl888prabhu Aug 18, 2025
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
3 changes: 3 additions & 0 deletions ci/build_wheel_cuopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ set -euo pipefail

source rapids-init-pip

# Install cudss
bash ci/utils/install_cudss.sh

package_dir="python/cuopt"
export SKBUILD_CMAKE_ARGS="-DCUOPT_BUILD_WHEELS=ON;-DDISABLE_DEPRECATION_WARNINGS=ON";

Expand Down
19 changes: 19 additions & 0 deletions ci/build_wheel_libcuopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ else
echo "Building in release mode"
fi

# Install cudss
bash ci/utils/install_cudss.sh

# Clean metadata & install cudss
if command -v dnf &> /dev/null; then
dnf clean all
# Adding static library just to please CMAKE requirements
dnf -y install libcudss0-static-cuda-12 libcudss0-devel-cuda-12 libcudss0-cuda-12
elif command -v apt-get &> /dev/null; then
apt-get update
apt-get install -y libcudss-devel
else
echo "Neither dnf nor apt-get found. Cannot install cudss dependencies."
exit 1
fi
# dnf -y install libcudss0-devel-cuda-12


rapids-logger "Generating build requirements"

CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
Expand Down Expand Up @@ -62,6 +80,7 @@ EXCLUDE_ARGS=(
--exclude "libraft.so"
--exclude "libcublas.so.*"
--exclude "libcublasLt.so.*"
--exclude "libcudss.so.*"
--exclude "libcurand.so.*"
--exclude "libcusolver.so.*"
--exclude "libcusparse.so.*"
Expand Down
31 changes: 31 additions & 0 deletions ci/utils/install_cudss.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

# Clean metadata & install cudss
if command -v dnf &> /dev/null; then
dnf clean all
# Adding static library just to please CMAKE requirements
dnf -y install libcudss0-static-cuda-12 libcudss0-devel-cuda-12 libcudss0-cuda-12
elif command -v apt-get &> /dev/null; then
apt-get update
apt-get install -y libcudss-devel
else
echo "Neither dnf nor apt-get found. Cannot install cudss dependencies."
exit 1
fi
42 changes: 42 additions & 0 deletions cmake/FindCUDSS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# =============================================================================
# Copyright (c) 2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================

if (CUDSS_INCLUDE AND CUDSS_LIBRARIES)
set(CUDSS_FIND_QUIETLY TRUE)
endif (CUDSS_INCLUDE AND CUDSS_LIBRARIES)

message(STATUS "CUDSS DIR = $ENV{CUDSS_DIR}")


find_path(CUDSS_INCLUDE
NAMES
cudss.h
PATHS
$ENV{CUDSS_DIR}/include
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
cudss
)


find_library(CUDSS_LIBRARIES cudss PATHS $ENV{CUDSS_DIR}/lib ${LIB_INSTALL_DIR})

message(STATUS "CUDSS_INCLUDE = ${CUDSS_INCLUDE}")
message(STATUS "CUDSS_LIBRARIES = ${CUDSS_LIBRARIES}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CHOLMOD DEFAULT_MSG
CUDSS_INCLUDE CUDSS_LIBRARIES)

mark_as_advanced(CUDSS_INCLUDE CUDSS_LIBRARIES)
1 change: 1 addition & 0 deletions conda/environments/all_cuda-128_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- httpx
- ipython
- jsonref==1.1.0
- libcudss-dev
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- httpx
- ipython
- jsonref==1.1.0
- libcudss-dev
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
Expand Down
3 changes: 3 additions & 0 deletions conda/recipes/libcuopt/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ cache:
- librmm =${{ dep_minor_version }}
- rapids-logger =0.1
- cuda-nvtx-dev
- libcudss-dev
- libcurand-dev
- libcusparse-dev
- cuda-cudart-dev
Expand Down Expand Up @@ -133,6 +134,7 @@ outputs:
- rapids-logger =0.1
- librmm =${{ dep_minor_version }}
- cuda-cudart-dev
- libcudss-dev
- libcublas
- libcusparse-dev
run:
Expand Down Expand Up @@ -183,6 +185,7 @@ outputs:
- gmock ${{ gtest_version }}
- gtest ${{ gtest_version }}
- cuda-cudart-dev
- libcudss-dev
- libcublas
- libcusparse-dev
run:
Expand Down
26 changes: 26 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ include(rapids-find)

rapids_cuda_init_architectures(CUOPT)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")

project(
CUOPT
VERSION 25.10.00
Expand Down Expand Up @@ -180,6 +183,8 @@ include(${rapids-cmake-dir}/cpm/rapids_logger.cmake)
rapids_cpm_rapids_logger(BUILD_EXPORT_SET cuopt-exports INSTALL_EXPORT_SET cuopt-exports)
create_logger_macros(CUOPT "cuopt::default_logger()" include/cuopt)

find_package(CUDSS REQUIRED)

if(BUILD_TESTS)
include(cmake/thirdparty/get_gtest.cmake)
endif()
Expand Down Expand Up @@ -222,19 +227,22 @@ target_link_options(cuopt PRIVATE "${CUOPT_BINARY_DIR}/fatbin.ld")
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
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty"
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CUDSS_INCLUDE}"
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libmps_parser/include>"
INTERFACE
"$<INSTALL_INTERFACE:include>"
${CUDSS_INCLUDE}
)

# ##################################################################################################
Expand All @@ -250,6 +258,23 @@ list(PREPEND CUOPT_PRIVATE_CUDA_LIBS CUDA::cublasLt)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libmps_parser)
set(CMAKE_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/libmps_parser/)

find_package(cudss REQUIRED CONFIG)

# Print all details of the cudss package
message(STATUS "cudss package details:")
message(STATUS " cudss_FOUND: ${cudss_FOUND}")
message(STATUS " cudss_VERSION: ${cudss_VERSION}")
message(STATUS " cudss_INCLUDE_DIRS: ${cudss_INCLUDE_DIRS}")
message(STATUS " cudss_LIBRARY_DIR: ${cudss_LIBRARY_DIR}")
message(STATUS " cudss_LIBRARIES: ${cudss_LIBRARIES}")
message(STATUS " cudss_DEFINITIONS: ${cudss_DEFINITIONS}")
message(STATUS " cudss_COMPILE_OPTIONS: ${cudss_COMPILE_OPTIONS}")
message(STATUS " cudss_LINK_OPTIONS: ${cudss_LINK_OPTIONS}")

# Use the specific cudss library version to avoid symlink issues
set(CUDSS_LIB_FILE "${cudss_LIBRARY_DIR}/libcudss.so.0")
message(STATUS "Using cudss library: ${CUDSS_LIB_FILE}")


target_link_libraries(cuopt
PUBLIC
Expand All @@ -260,6 +285,7 @@ target_link_libraries(cuopt
CCCL::CCCL
raft::raft
cuopt::mps_parser
${CUDSS_LIB_FILE}
PRIVATE
${CUOPT_PRIVATE_CUDA_LIBS}
)
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/cuopt/linear_programming/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define CUOPT_LOG_FILE "log_file"
#define CUOPT_LOG_TO_CONSOLE "log_to_console"
#define CUOPT_CROSSOVER "crossover"
#define CUOPT_USE_CUDSS "use_cudss"
#define CUOPT_PRESOLVE "presolve"
#define CUOPT_MIP_ABSOLUTE_TOLERANCE "mip_absolute_tolerance"
#define CUOPT_MIP_RELATIVE_TOLERANCE "mip_relative_tolerance"
Expand Down Expand Up @@ -105,6 +106,7 @@
#define CUOPT_METHOD_CONCURRENT 0
#define CUOPT_METHOD_PDLP 1
#define CUOPT_METHOD_DUAL_SIMPLEX 2
#define CUOPT_METHOD_BARRIER 3

/* @brief Status codes constants */
#define CUOPT_SUCCESS 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ enum pdlp_solver_mode_t : int {
enum method_t : int {
Concurrent = CUOPT_METHOD_CONCURRENT,
PDLP = CUOPT_METHOD_PDLP,
DualSimplex = CUOPT_METHOD_DUAL_SIMPLEX
DualSimplex = CUOPT_METHOD_DUAL_SIMPLEX,
Barrier = CUOPT_METHOD_BARRIER
};

template <typename i_t, typename f_t>
Expand Down Expand Up @@ -207,6 +208,7 @@ class pdlp_solver_settings_t {
std::string user_problem_file{""};
bool per_constraint_residual{false};
bool crossover{false};
bool use_cudss{false};
bool save_best_primal_so_far{false};
bool first_primal_feasible{false};
bool presolve{false};
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/dual_simplex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

set(DUAL_SIMPLEX_SRC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/barrier.cpp
${CMAKE_CURRENT_SOURCE_DIR}/basis_solves.cpp
${CMAKE_CURRENT_SOURCE_DIR}/basis_updates.cpp
${CMAKE_CURRENT_SOURCE_DIR}/bound_flipping_ratio_test.cpp
Expand All @@ -36,5 +37,7 @@ set(DUAL_SIMPLEX_SRC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/triangle_solve.cpp
${CMAKE_CURRENT_SOURCE_DIR}/vector_math.cpp)

set_source_files_properties(${DUAL_SIMPLEX_SRC_FILES} DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTIES COMPILE_OPTIONS "-g1")

set(CUOPT_SRC_FILES ${CUOPT_SRC_FILES}
${DUAL_SIMPLEX_SRC_FILES} PARENT_SCOPE)
Loading
Loading