Skip to content

Commit 2bb8de9

Browse files
committed
Merge branch 'branch-25.08' of github.com:NVIDIA/cuopt into lb_bounds_fix
2 parents 509dfe6 + e33e73c commit 2bb8de9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+974
-348
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
secrets: inherit
4646
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.08
4747
with:
48-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
4948
build_type: ${{ inputs.build_type || 'branch' }}
5049
branch: ${{ inputs.branch }}
5150
date: ${{ inputs.date }}
@@ -56,7 +55,6 @@ jobs:
5655
secrets: inherit
5756
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.08
5857
with:
59-
matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER != "3.13"))
6058
build_type: ${{ inputs.build_type || 'branch' }}
6159
branch: ${{ inputs.branch }}
6260
date: ${{ inputs.date }}
@@ -80,7 +78,6 @@ jobs:
8078
sha: ${{ inputs.sha }}
8179
date: ${{ inputs.date }}
8280
script: ci/build_wheel_cuopt_mps_parser.sh
83-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
8481
package-name: cuopt_mps_parser
8582
package-type: python
8683
append-cuda-suffix: false
@@ -107,7 +104,7 @@ jobs:
107104
script: ci/build_wheel_libcuopt.sh
108105
package-name: libcuopt
109106
package-type: cpp
110-
matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER == "3.12"))
107+
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
111108
wheel-publish-libcuopt:
112109
needs: wheel-build-libcuopt
113110
secrets: inherit
@@ -124,7 +121,6 @@ jobs:
124121
secrets: inherit
125122
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08
126123
with:
127-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
128124
build_type: ${{ inputs.build_type || 'branch' }}
129125
branch: ${{ inputs.branch }}
130126
sha: ${{ inputs.sha }}
@@ -148,7 +144,6 @@ jobs:
148144
secrets: inherit
149145
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08
150146
with:
151-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
152147
build_type: ${{ inputs.build_type || 'branch' }}
153148
branch: ${{ inputs.branch }}
154149
sha: ${{ inputs.sha }}
@@ -192,7 +187,6 @@ jobs:
192187
sha: ${{ inputs.sha }}
193188
date: ${{ inputs.date }}
194189
script: ci/build_wheel_cuopt_sh_client.sh
195-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
196190
package-name: cuopt_sh_client
197191
package-type: python
198192
append-cuda-suffix: false

.github/workflows/pr.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ jobs:
122122
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.08
123123
with:
124124
build_type: pull-request
125-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
126125
script: ci/build_cpp.sh
127126
conda-cpp-tests:
128127
needs: [conda-cpp-build, changed-files]
@@ -131,15 +130,13 @@ jobs:
131130
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
132131
with:
133132
build_type: pull-request
134-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
135133
script: ci/test_cpp.sh
136134
conda-python-build:
137135
needs: conda-cpp-build
138136
secrets: inherit
139137
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.08
140138
with:
141139
build_type: pull-request
142-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
143140
script: ci/build_python.sh
144141
conda-python-tests:
145142
needs: [conda-python-build, changed-files]
@@ -149,7 +146,6 @@ jobs:
149146
with:
150147
run_codecov: false
151148
build_type: pull-request
152-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
153149
script: ci/test_python.sh
154150
docs-build:
155151
needs: conda-python-build
@@ -163,17 +159,6 @@ jobs:
163159
artifact-name: "cuopt_docs"
164160
container_image: "rapidsai/ci-conda:25.08-latest"
165161
script: "ci/build_docs.sh"
166-
#conda-notebook-tests:
167-
# needs: [conda-python-build, changed-files]
168-
# secrets: inherit
169-
# uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.08
170-
# #if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
171-
# with:
172-
# build_type: pull-request
173-
# node_type: "gpu-l4-latest-1"
174-
# arch: "amd64"
175-
# container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
176-
# run_script: "ci/test_notebooks.sh"
177162
wheel-build-cuopt-mps-parser:
178163
secrets: inherit
179164
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08
@@ -183,14 +168,13 @@ jobs:
183168
package-name: cuopt_mps_parser
184169
package-type: python
185170
append-cuda-suffix: false
186-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
187171
wheel-build-libcuopt:
188172
needs: wheel-build-cuopt-mps-parser
189173
secrets: inherit
190174
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08
191175
with:
192176
# build for every combination of arch and CUDA version, but only for the latest Python
193-
matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER == "3.12"))
177+
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
194178
package-type: cpp
195179
package-name: libcuopt
196180
build_type: pull-request
@@ -204,7 +188,6 @@ jobs:
204188
script: ci/build_wheel_cuopt.sh
205189
package-name: cuopt
206190
package-type: python
207-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
208191
wheel-tests-cuopt:
209192
needs: [wheel-build-cuopt, wheel-build-cuopt-mps-parser, changed-files]
210193
secrets: inherit
@@ -213,7 +196,6 @@ jobs:
213196
with:
214197
build_type: pull-request
215198
script: ci/test_wheel_cuopt.sh
216-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
217199
wheel-build-cuopt-server:
218200
needs: wheel-build-cuopt
219201
secrets: inherit
@@ -223,14 +205,12 @@ jobs:
223205
script: ci/build_wheel_cuopt_server.sh
224206
package-name: cuopt_server
225207
package-type: python
226-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
227208
wheel-build-cuopt-sh-client:
228209
secrets: inherit
229210
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08
230211
with:
231212
build_type: pull-request
232213
script: ci/build_wheel_cuopt_sh_client.sh
233-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
234214
package-name: cuopt_sh_client
235215
package-type: python
236216
append-cuda-suffix: false
@@ -242,7 +222,6 @@ jobs:
242222
with:
243223
build_type: pull-request
244224
script: ci/test_wheel_cuopt_server.sh
245-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
246225
test-self-hosted-server:
247226
needs: [wheel-build-cuopt-server, changed-files]
248227
secrets: inherit

.github/workflows/test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
branch: ${{ inputs.branch }}
4141
date: ${{ inputs.date }}
4242
sha: ${{ inputs.sha }}
43-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
4443
script: ci/test_cpp.sh
4544
conda-python-tests:
4645
secrets: inherit
@@ -51,7 +50,6 @@ jobs:
5150
branch: ${{ inputs.branch }}
5251
date: ${{ inputs.date }}
5352
sha: ${{ inputs.sha }}
54-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
5553
script: ci/test_python.sh
5654
wheel-tests-cuopt:
5755
secrets: inherit
@@ -61,7 +59,6 @@ jobs:
6159
branch: ${{ inputs.branch }}
6260
date: ${{ inputs.date }}
6361
sha: ${{ inputs.sha }}
64-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
6562
script: ci/test_wheel_cuopt.sh
6663
wheel-tests-cuopt-server:
6764
secrets: inherit
@@ -71,5 +68,4 @@ jobs:
7168
branch: ${{ inputs.branch }}
7269
date: ${{ inputs.date }}
7370
sha: ${{ inputs.sha }}
74-
matrix_filter: map(select((.CUDA_VER | startswith("12"))))
7571
script: ci/test_wheel_cuopt_server.sh

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ cd $CUOPT_HOME
143143
./build.sh --help
144144
```
145145

146+
#### Deb package
147+
148+
`libcuopt.so` can be packaged as a deb package with option deb. This is a beta-feature and dependecies of libcuopt needs to be installed manually while installing it using deb package.
149+
This is only available to be built through source code and libcuopt is not being released as deb package in any official space.
150+
151+
```bash
152+
./build.sh libmps_parser libcuopt deb
153+
```
154+
146155
#### Building for development
147156

148157
To build all libraries and tests, simply run

build.sh

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ REPODIR=$(cd "$(dirname "$0")"; pwd)
2727
LIBCUOPT_BUILD_DIR=${LIBCUOPT_BUILD_DIR:=${REPODIR}/cpp/build}
2828
LIBMPS_PARSER_BUILD_DIR=${LIBMPS_PARSER_BUILD_DIR:=${REPODIR}/cpp/libmps_parser/build}
2929

30-
VALIDARGS="clean libcuopt libmps_parser cuopt_mps_parser cuopt cuopt_server cuopt_sh_client docs -a -b -g -v -l= --verbose-pdlp [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] -n --allgpuarch --ci-only-arch --show_depr_warn -h --help"
30+
VALIDARGS="clean libcuopt libmps_parser cuopt_mps_parser cuopt cuopt_server cuopt_sh_client docs deb -a -b -g -v -l= --verbose-pdlp [--cmake-args=\\\"<args>\\\"] [--cache-tool=<tool>] -n --allgpuarch --ci-only-arch --show_depr_warn -h --help"
3131
HELP="$0 [<target> ...] [<flag> ...]
3232
where <target> is:
3333
clean - remove all existing build artifacts and configuration (start over)
@@ -38,6 +38,7 @@ HELP="$0 [<target> ...] [<flag> ...]
3838
cuopt_server - build the cuopt_server Python package
3939
cuopt_sh_client - build cuopt self host client
4040
docs - build the docs
41+
deb - build deb package (requires libcuopt to be built first)
4142
and <flag> is:
4243
-v - verbose build mode
4344
-g - build for debug
@@ -268,13 +269,8 @@ if [ ${BUILD_ALL_GPU_ARCH} -eq 1 ]; then
268269
echo "Building for *ALL* supported GPU architectures..."
269270
else
270271
if [ ${BUILD_CI_ONLY} -eq 1 ]; then
271-
if [[ ${CUDA_VERSION} == 11* ]]; then
272-
CUOPT_CMAKE_CUDA_ARCHITECTURES="70-real;80"
273-
echo "Building for Volta and Ampere architectures..."
274-
else
275-
CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS"
276-
echo "Building for Volta, Ampere and Hopper architectures..."
277-
fi
272+
CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS"
273+
echo "Building for RAPIDS supported architectures..."
278274
else
279275
CUOPT_CMAKE_CUDA_ARCHITECTURES="NATIVE"
280276
echo "Building for the architecture of the GPU in the system..."
@@ -321,6 +317,21 @@ if buildAll || hasArg libcuopt; then
321317
fi
322318
fi
323319

320+
################################################################################
321+
# Build deb package
322+
if hasArg deb; then
323+
# Check if libcuopt has been built
324+
if [ ! -d "${LIBCUOPT_BUILD_DIR}" ]; then
325+
echo "Error: libcuopt must be built before creating deb package. Run with 'libcuopt' target first."
326+
exit 1
327+
fi
328+
329+
echo "Building deb package..."
330+
cd "${LIBCUOPT_BUILD_DIR}"
331+
cpack -G DEB
332+
echo "Deb package created in ${LIBCUOPT_BUILD_DIR}"
333+
fi
334+
324335

325336
# Build and install the cuopt Python package
326337
if buildAll || hasArg cuopt; then
@@ -358,5 +369,5 @@ if buildAll || hasArg docs; then
358369

359370
cd "${REPODIR}"/docs/cuopt
360371
make clean
361-
make html
372+
make html linkcheck
362373
fi

ci/test_self_hosted_service.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ if [ "$doservertest" -eq 1 ]; then
217217
# Test for message on absolute path, bad directory
218218
run_cli_test "Absolute path '/nohay' does not exist" cuopt_sh -s -c "$CLIENT_CERT" -p $CUOPT_SERVER_PORT -f /nohay/nada
219219

220+
# Set all current and deprecated solver_config values and make sure the service does not reject the dataset
221+
# This is a smoketest against parameter name misalignment
222+
run_cli_test "'status': 'Optimal'" cuopt_sh -s -c $CLIENT_CERT -p $CUOPT_SERVER_PORT ../../datasets/cuopt_service_data/lpmip_configs.json
223+
220224
rapids-logger "Running cuopt_self_hosted Python tests"
221225
pytest tests
222226

conda/recipes/libcuopt/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cache:
2929
export CXXFLAGS=$(echo $CXXFLAGS | sed -E 's@\-fdebug\-prefix\-map[^ ]*@@g')
3030
set +x
3131
32-
./build.sh -n -v -a libmps_parser libcuopt --ci-only-arch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
32+
./build.sh -n -v -a libmps_parser libcuopt deb --allgpuarch --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
3333
secrets:
3434
- AWS_ACCESS_KEY_ID
3535
- AWS_SECRET_ACCESS_KEY

0 commit comments

Comments
 (0)