From 1f9f3560e887540801af80eec7380d9bc1e663bd Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 22 Jul 2025 10:04:34 -0500 Subject: [PATCH 1/7] remove cuda 11 specific changes --- .github/workflows/build.yaml | 8 +------- .github/workflows/pr.yaml | 23 +---------------------- .github/workflows/test.yaml | 4 ---- build.sh | 5 ----- cpp/CMakeLists.txt | 5 ----- 5 files changed, 2 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6f8b0485ff..9461a913fe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,6 @@ jobs: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.08 with: - matrix_filter: map(select((.CUDA_VER | startswith("12")))) build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} date: ${{ inputs.date }} @@ -56,7 +55,6 @@ jobs: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.08 with: - matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER != "3.13")) build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} date: ${{ inputs.date }} @@ -80,7 +78,6 @@ jobs: sha: ${{ inputs.sha }} date: ${{ inputs.date }} script: ci/build_wheel_cuopt_mps_parser.sh - matrix_filter: map(select((.CUDA_VER | startswith("12")))) package-name: cuopt_mps_parser package-type: python append-cuda-suffix: false @@ -107,7 +104,7 @@ jobs: script: ci/build_wheel_libcuopt.sh package-name: libcuopt package-type: cpp - matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER == "3.12")) + matrix_filter: map(select(.PY_VER == "3.13")) wheel-publish-libcuopt: needs: wheel-build-libcuopt secrets: inherit @@ -124,7 +121,6 @@ jobs: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 with: - matrix_filter: map(select((.CUDA_VER | startswith("12")))) build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} sha: ${{ inputs.sha }} @@ -148,7 +144,6 @@ jobs: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 with: - matrix_filter: map(select((.CUDA_VER | startswith("12")))) build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} sha: ${{ inputs.sha }} @@ -192,7 +187,6 @@ jobs: sha: ${{ inputs.sha }} date: ${{ inputs.date }} script: ci/build_wheel_cuopt_sh_client.sh - matrix_filter: map(select((.CUDA_VER | startswith("12")))) package-name: cuopt_sh_client package-type: python append-cuda-suffix: false diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7ee94cfb24..4c9c0a23c4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -122,7 +122,6 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.08 with: build_type: pull-request - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/build_cpp.sh conda-cpp-tests: needs: [conda-cpp-build, changed-files] @@ -131,7 +130,6 @@ jobs: #if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_cpp.sh conda-python-build: needs: conda-cpp-build @@ -139,7 +137,6 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.08 with: build_type: pull-request - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/build_python.sh conda-python-tests: needs: [conda-python-build, changed-files] @@ -149,7 +146,6 @@ jobs: with: run_codecov: false build_type: pull-request - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_python.sh docs-build: needs: conda-python-build @@ -163,17 +159,6 @@ jobs: artifact-name: "cuopt_docs" container_image: "rapidsai/ci-conda:25.08-latest" script: "ci/build_docs.sh" - #conda-notebook-tests: - # needs: [conda-python-build, changed-files] - # secrets: inherit - # uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.08 - # #if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks - # with: - # build_type: pull-request - # node_type: "gpu-l4-latest-1" - # arch: "amd64" - # container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10" - # run_script: "ci/test_notebooks.sh" wheel-build-cuopt-mps-parser: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 @@ -183,14 +168,13 @@ jobs: package-name: cuopt_mps_parser package-type: python append-cuda-suffix: false - matrix_filter: map(select((.CUDA_VER | startswith("12")))) wheel-build-libcuopt: needs: wheel-build-cuopt-mps-parser secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 with: # build for every combination of arch and CUDA version, but only for the latest Python - matrix_filter: map(select((.CUDA_VER | startswith("12")) and .PY_VER == "3.12")) + matrix_filter: map(select(.PY_VER == "3.13")) package-type: cpp package-name: libcuopt build_type: pull-request @@ -204,7 +188,6 @@ jobs: script: ci/build_wheel_cuopt.sh package-name: cuopt package-type: python - matrix_filter: map(select((.CUDA_VER | startswith("12")))) wheel-tests-cuopt: needs: [wheel-build-cuopt, wheel-build-cuopt-mps-parser, changed-files] secrets: inherit @@ -213,7 +196,6 @@ jobs: with: build_type: pull-request script: ci/test_wheel_cuopt.sh - matrix_filter: map(select((.CUDA_VER | startswith("12")))) wheel-build-cuopt-server: needs: wheel-build-cuopt secrets: inherit @@ -223,14 +205,12 @@ jobs: script: ci/build_wheel_cuopt_server.sh package-name: cuopt_server package-type: python - matrix_filter: map(select((.CUDA_VER | startswith("12")))) wheel-build-cuopt-sh-client: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 with: build_type: pull-request script: ci/build_wheel_cuopt_sh_client.sh - matrix_filter: map(select((.CUDA_VER | startswith("12")))) package-name: cuopt_sh_client package-type: python append-cuda-suffix: false @@ -242,7 +222,6 @@ jobs: with: build_type: pull-request script: ci/test_wheel_cuopt_server.sh - matrix_filter: map(select((.CUDA_VER | startswith("12")))) test-self-hosted-server: needs: [wheel-build-cuopt-server, changed-files] secrets: inherit diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6cd2513323..203eee65a3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,7 +40,6 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_cpp.sh conda-python-tests: secrets: inherit @@ -51,7 +50,6 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_python.sh wheel-tests-cuopt: secrets: inherit @@ -61,7 +59,6 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_wheel_cuopt.sh wheel-tests-cuopt-server: secrets: inherit @@ -71,5 +68,4 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} - matrix_filter: map(select((.CUDA_VER | startswith("12")))) script: ci/test_wheel_cuopt_server.sh diff --git a/build.sh b/build.sh index 7cb9aa82c2..8437ae630e 100755 --- a/build.sh +++ b/build.sh @@ -268,13 +268,8 @@ if [ ${BUILD_ALL_GPU_ARCH} -eq 1 ]; then echo "Building for *ALL* supported GPU architectures..." else if [ ${BUILD_CI_ONLY} -eq 1 ]; then - if [[ ${CUDA_VERSION} == 11* ]]; then - CUOPT_CMAKE_CUDA_ARCHITECTURES="70-real;80" - echo "Building for Volta and Ampere architectures..." - else CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS" echo "Building for Volta, Ampere and Hopper architectures..." - fi else CUOPT_CMAKE_CUDA_ARCHITECTURES="NATIVE" echo "Building for the architecture of the GPU in the system..." diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 2286bd6dcc..d48ac62197 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -33,11 +33,6 @@ project( LANGUAGES CXX CUDA C ) -if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_LESS 12.0.0) - list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES "90") - list(APPEND CMAKE_CUDA_ARCHITECTURES "80-virtual") -endif() - set(DEPENDENT_LIB_MAJOR_VERSION "25") set(DEPENDENT_LIB_MINOR_VERSION "08") From 5f9679c7563d0ef36a6321873e2619fbde6bb9de Mon Sep 17 00:00:00 2001 From: Ramakrishnap <42624703+rgsl888prabhu@users.noreply.github.com> Date: Tue, 22 Jul 2025 10:16:13 -0500 Subject: [PATCH 2/7] Update build.sh Co-authored-by: Kyle Edwards --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 8437ae630e..8141501838 100755 --- a/build.sh +++ b/build.sh @@ -268,8 +268,8 @@ if [ ${BUILD_ALL_GPU_ARCH} -eq 1 ]; then echo "Building for *ALL* supported GPU architectures..." else if [ ${BUILD_CI_ONLY} -eq 1 ]; then - CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS" - echo "Building for Volta, Ampere and Hopper architectures..." + CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS" + echo "Building for Volta, Ampere and Hopper architectures..." else CUOPT_CMAKE_CUDA_ARCHITECTURES="NATIVE" echo "Building for the architecture of the GPU in the system..." From 7ff237d3e15217da6de76d8820267e08f3e0824b Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 22 Jul 2025 10:23:23 -0500 Subject: [PATCH 3/7] update --- .github/workflows/build.yaml | 2 +- .github/workflows/pr.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9461a913fe..829d02e6c6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -104,7 +104,7 @@ jobs: script: ci/build_wheel_libcuopt.sh package-name: libcuopt package-type: cpp - matrix_filter: map(select(.PY_VER == "3.13")) + matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber))) wheel-publish-libcuopt: needs: wheel-build-libcuopt secrets: inherit diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 4c9c0a23c4..8aadeb4a09 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -174,7 +174,7 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.08 with: # build for every combination of arch and CUDA version, but only for the latest Python - matrix_filter: map(select(.PY_VER == "3.13")) + matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber))) package-type: cpp package-name: libcuopt build_type: pull-request From 5f90652ff1c723704ba1b742888bff5e1c7a116d Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 22 Jul 2025 14:34:31 -0500 Subject: [PATCH 4/7] remove additional nullptr and 0 usage required for 11.8 --- cpp/src/linear_programming/utilities/ping_pong_graph.cuh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpp/src/linear_programming/utilities/ping_pong_graph.cuh b/cpp/src/linear_programming/utilities/ping_pong_graph.cuh index ab813865e4..4aa23f7eef 100644 --- a/cpp/src/linear_programming/utilities/ping_pong_graph.cuh +++ b/cpp/src/linear_programming/utilities/ping_pong_graph.cuh @@ -49,14 +49,12 @@ class ping_pong_graph_t { { if (total_pdlp_iterations % 2 == 0 && !even_initialized) { RAFT_CUDA_TRY(cudaStreamEndCapture(stream_view_.value(), &even_graph)); - // Extra NULL NULL 0 mandatory for cuda 11.8 - RAFT_CUDA_TRY(cudaGraphInstantiate(&even_instance, even_graph, nullptr, nullptr, 0)); + RAFT_CUDA_TRY(cudaGraphInstantiate(&even_instance, even_graph)); even_initialized = true; RAFT_CUDA_TRY_NO_THROW(cudaGraphDestroy(even_graph)); } else if (total_pdlp_iterations % 2 == 1 && !odd_initialized) { RAFT_CUDA_TRY(cudaStreamEndCapture(stream_view_.value(), &odd_graph)); - // Extra NULL NULL 0 mandatory for cuda 11.8 - RAFT_CUDA_TRY(cudaGraphInstantiate(&odd_instance, odd_graph, nullptr, nullptr, 0)); + RAFT_CUDA_TRY(cudaGraphInstantiate(&odd_instance, odd_graph)); odd_initialized = true; RAFT_CUDA_TRY_NO_THROW(cudaGraphDestroy(odd_graph)); } From b556bea64a8e4223cb37b72bd97b76d14925940d Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 22 Jul 2025 15:20:58 -0500 Subject: [PATCH 5/7] address review comments --- cpp/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d48ac62197..0033996717 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -214,9 +214,7 @@ set(CUOPT_PRIVATE_CUDA_LIBS CUDA::cusolver OpenMP::OpenMP_CXX) -if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.4) - list(PREPEND CUOPT_PRIVATE_CUDA_LIBS CUDA::cublasLt) -endif() +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/) From 84d67fd51be82c25330a36204ae6062b319421f0 Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Thu, 24 Jul 2025 14:02:20 -0500 Subject: [PATCH 6/7] address review comments --- cpp/src/linear_programming/utilities/ping_pong_graph.cuh | 2 -- cpp/src/mip/feasibility_jump/feasibility_jump.cu | 2 +- cpp/src/mip/presolve/load_balanced_bounds_presolve.cu | 4 ++-- cpp/src/routing/cuda_graph.cuh | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cpp/src/linear_programming/utilities/ping_pong_graph.cuh b/cpp/src/linear_programming/utilities/ping_pong_graph.cuh index 7140344678..9fd5c6586f 100644 --- a/cpp/src/linear_programming/utilities/ping_pong_graph.cuh +++ b/cpp/src/linear_programming/utilities/ping_pong_graph.cuh @@ -59,13 +59,11 @@ class ping_pong_graph_t { if (!is_batch_mode_) { if (total_pdlp_iterations % 2 == 0 && !even_initialized) { RAFT_CUDA_TRY(cudaStreamEndCapture(stream_view_.value(), &even_graph)); - // Extra NULL NULL 0 mandatory for cuda 11.8 RAFT_CUDA_TRY(cudaGraphInstantiate(&even_instance, even_graph)); even_initialized = true; RAFT_CUDA_TRY_NO_THROW(cudaGraphDestroy(even_graph)); } else if (total_pdlp_iterations % 2 == 1 && !odd_initialized) { RAFT_CUDA_TRY(cudaStreamEndCapture(stream_view_.value(), &odd_graph)); - // Extra NULL NULL 0 mandatory for cuda 11.8 RAFT_CUDA_TRY(cudaGraphInstantiate(&odd_instance, odd_graph)); odd_initialized = true; RAFT_CUDA_TRY_NO_THROW(cudaGraphDestroy(odd_graph)); diff --git a/cpp/src/mip/feasibility_jump/feasibility_jump.cu b/cpp/src/mip/feasibility_jump/feasibility_jump.cu index ba92a99a87..fa88bddd19 100644 --- a/cpp/src/mip/feasibility_jump/feasibility_jump.cu +++ b/cpp/src/mip/feasibility_jump/feasibility_jump.cu @@ -785,7 +785,7 @@ void fj_t::run_step_device(const rmm::cuda_stream_view& climber_stream if (use_graph) { cudaStreamEndCapture(climber_stream, &graph); - cudaGraphInstantiate(&graph_instance, graph, NULL, NULL, 0); + cudaGraphInstantiate(&graph_instance, graph); RAFT_CHECK_CUDA(climber_stream); cudaGraphDestroy(graph); graph_created = true; diff --git a/cpp/src/mip/presolve/load_balanced_bounds_presolve.cu b/cpp/src/mip/presolve/load_balanced_bounds_presolve.cu index 091f8a53b5..0a497d466e 100644 --- a/cpp/src/mip/presolve/load_balanced_bounds_presolve.cu +++ b/cpp/src/mip/presolve/load_balanced_bounds_presolve.cu @@ -203,10 +203,10 @@ bool build_graph(managed_stream_pool& streams, if (graph_exec != nullptr) { cudaGraphExecDestroy(graph_exec); - cudaGraphInstantiate(&graph_exec, graph, NULL, NULL, 0); + cudaGraphInstantiate(&graph_exec, graph); RAFT_CHECK_CUDA(handle_ptr->get_stream()); } else { - cudaGraphInstantiate(&graph_exec, graph, NULL, NULL, 0); + cudaGraphInstantiate(&graph_exec, graph); RAFT_CHECK_CUDA(handle_ptr->get_stream()); } diff --git a/cpp/src/routing/cuda_graph.cuh b/cpp/src/routing/cuda_graph.cuh index 563cc6f56b..898bde65dc 100644 --- a/cpp/src/routing/cuda_graph.cuh +++ b/cpp/src/routing/cuda_graph.cuh @@ -54,7 +54,7 @@ struct cuda_graph_t { if (graph_created) { cudaGraphExecDestroy(instance); } // Instantiate graphExec from graph. The error node and // error message parameters are unused here. - cudaGraphInstantiate(&instance, graph, NULL, NULL, 0); + cudaGraphInstantiate(&instance, graph); graph_created = true; } cudaGraphDestroy(graph); From ce427fa14677f848ee794c60f3e968160657bf5b Mon Sep 17 00:00:00 2001 From: Ramakrishnap <42624703+rgsl888prabhu@users.noreply.github.com> Date: Mon, 28 Jul 2025 11:05:35 -0500 Subject: [PATCH 7/7] Update build.sh Co-authored-by: Bradley Dice --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 8141501838..13e6a7bf6d 100755 --- a/build.sh +++ b/build.sh @@ -269,7 +269,7 @@ if [ ${BUILD_ALL_GPU_ARCH} -eq 1 ]; then else if [ ${BUILD_CI_ONLY} -eq 1 ]; then CUOPT_CMAKE_CUDA_ARCHITECTURES="RAPIDS" - echo "Building for Volta, Ampere and Hopper architectures..." + echo "Building for RAPIDS supported architectures..." else CUOPT_CMAKE_CUDA_ARCHITECTURES="NATIVE" echo "Building for the architecture of the GPU in the system..."