Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
57c7061
added non const convergence information getter
Bubullzz May 26, 2026
9f78d05
compute_convergence_information is now on multi-gpu
Bubullzz May 26, 2026
c484485
fill_return_problem_solutionis now ready !!
Bubullzz May 26, 2026
fc46080
added reduced cost in gathering of solution, builds and runs
Bubullzz May 26, 2026
6538382
updated mgpu scale/unscale logic
Bubullzz May 27, 2026
a88285a
wired mgpu restart
Bubullzz May 27, 2026
b34c5f6
dummy version locally seems to work ?????
Bubullzz May 27, 2026
b784a44
added dummy partitionner
Bubullzz May 27, 2026
ca7d7a9
added stream forking for cuda graph
Bubullzz May 27, 2026
0310d50
updated convergence information to use potential_next rather than cu…
Bubullzz May 27, 2026
f811bc8
disabled graph, can sole afiro hehe
Bubullzz May 27, 2026
4d7e2fc
added join_from_shards in convergence_info, now afiro is erfect 510 b…
Bubullzz May 28, 2026
7ad4606
use spmvop in mgpu and fixed small bug of increment_iteration_since_l…
Bubullzz May 28, 2026
03d1259
re-enabled graph. not working
Bubullzz May 28, 2026
cdc912b
Cleaner sync semantics, ez ez ez, single mGPU gives exact same result…
Bubullzz May 28, 2026
04d22cf
pad local matrices for easier integration and allow mismatch of nnz b…
Bubullzz May 29, 2026
b41df45
copy scalars to host rather than direct d2d. better
Bubullzz May 29, 2026
a1ffe1d
force re-inject offset and variables to undo the sort, cheap and ugly…
Bubullzz May 29, 2026
c9394d9
few style changes, better args and prints
Bubullzz May 29, 2026
4faa7df
added disable_graph flag, afiro gets solved on non-graph just as if i…
Bubullzz May 29, 2026
61acddb
makes reductions in compute interraction adn movement use owned_size …
Bubullzz May 31, 2026
b8b59bf
added emtis partitionner, still need it in the env. it is FAST. but w…
Bubullzz May 31, 2026
7d74e74
forgot to push a file, maybe doesnt compile lol
Bubullzz May 31, 2026
859a299
fixed dummy partitionner on single gpu
Bubullzz Jun 1, 2026
7daa740
added some plumbing, will not load full problem on gpu
Bubullzz Jun 1, 2026
8a39e8c
added guard to ensure presolver is not supported in mGPU
Bubullzz Jun 1, 2026
5a3b9ce
plumbed pdlp_distributed_solver with mps_data_model and now data doe…
Bubullzz Jun 2, 2026
e4739b5
removed usage of problem_t for distributed PDLP
Bubullzz Jun 2, 2026
1903f4b
added a cuopt assert for solve_lp in mgpu mode
Bubullzz Jun 2, 2026
0aacb4f
style
Bubullzz Jun 2, 2026
6df8145
fixed bound/objective rescaling, now afiro on 8 shards work but hangs…
Bubullzz Jun 2, 2026
df9f793
actually disable the graph ^^ (kms)
Bubullzz Jun 2, 2026
4c8bcd1
added option to export parts file
Bubullzz Jun 4, 2026
a8a8054
addded test for import export parts file
Bubullzz Jun 4, 2026
5abcd2e
added full solve tests
Bubullzz Jun 4, 2026
0b0ce2c
added kaminpar partitionner and possibility to chose the partitionner
Bubullzz Jun 4, 2026
91b1ae5
style
Bubullzz Jun 4, 2026
caea509
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 10, 2026
c6c5940
moved an expect for edge case from code rabbit
Bubullzz Jun 11, 2026
3488874
updated test
Bubullzz Jun 11, 2026
bc1f87e
update comment for code rabbit
Bubullzz Jun 11, 2026
b28f07d
added check to ensure distributed pdlp is only activated with method_…
Bubullzz Jun 11, 2026
9ae23a0
reverted back solve_lp from mps for better handling
Bubullzz Jun 11, 2026
818ffcd
small clearer comment for pdlp_disable_graph
Bubullzz Jun 11, 2026
d3dad66
updated gather of final solution positionning in the code
Bubullzz Jun 11, 2026
74c2d8f
added include for compile
Bubullzz Jun 12, 2026
cfdacd4
kaminpar compile
Bubullzz Jun 12, 2026
0de9609
expect no initial or warm start
Bubullzz Jun 12, 2026
1d43e8a
clean error if handle is null
Bubullzz Jun 12, 2026
f3b6343
better exept for never_restart_to_average
Bubullzz Jun 12, 2026
c658769
style
Bubullzz Jun 12, 2026
38fffaf
removed scaled problem before shard building, and optimized code to g…
Bubullzz Jun 5, 2026
eb08f11
added prints to now rank data timings
Bubullzz Jun 5, 2026
0816778
also print shard time
Bubullzz Jun 5, 2026
9aca029
kaminpar quiet
Bubullzz Jun 5, 2026
873d167
read mps for the compile !!
Bubullzz Jun 12, 2026
5c74a4d
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 13, 2026
e9cad7a
removed any reference to metis partitionner
Bubullzz Jun 15, 2026
12edf2d
Change the way kaminpar is pulled
Bubullzz Jun 15, 2026
2a35703
style
Bubullzz Jun 15, 2026
f5ac616
Better KaminPAr pulling
Bubullzz Jun 15, 2026
40f7cf5
better kaminpar pulling again
Bubullzz Jun 15, 2026
c4565d1
added KAMINPAR_64BIT_EDGE_IDS
Bubullzz Jun 16, 2026
3acd4d3
review ready kaminpar partitionner
Bubullzz Jun 16, 2026
cfbb27a
wheel measured ~727 MiB so bump up max allowed size
Bubullzz Jun 16, 2026
5855aa8
bump wheel size
Bubullzz Jun 16, 2026
7917f66
replaced 19 args function with a mps_data_model_t
Bubullzz Jun 16, 2026
a286381
cleaned multi_gpu engine. now taking mps_data_model as input.
Bubullzz Jun 16, 2026
fb3692d
new scaling
Bubullzz Jun 16, 2026
6ebdcb9
disable graph in distributed tests
Bubullzz Jun 16, 2026
d65fca5
moved function into distributed_algorithms.hpp
Bubullzz Jun 16, 2026
197df24
use RAII communicators
Bubullzz Jun 16, 2026
ed4f9e1
cleaned distributed_algorithm.cu
Bubullzz Jun 16, 2026
c193656
replaced raw cudamemcopy with raft::copy
Bubullzz Jun 16, 2026
c42f770
updated multi_gpu_engine for clarity
Bubullzz Jun 16, 2026
c551415
instantiate as float to allow compilation
Bubullzz Jun 17, 2026
83668c0
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 17, 2026
558b90d
updated comments and cleaned partition_loader
Bubullzz Jun 17, 2026
1223b4a
replaced hardcoded nccl types with compile time found types
Bubullzz Jun 17, 2026
57c860a
cleaned partition.cpp/hpp and moved kaminpar partitionner into it
Bubullzz Jun 17, 2026
349a127
review ready pdlp/distributed_pdlp
Bubullzz Jun 17, 2026
f40bcfe
updated solver settings comments
Bubullzz Jun 17, 2026
7103655
removed mgpu_trace
Bubullzz Jun 17, 2026
80fb188
remove comment in saddle_point.cu
Bubullzz Jun 17, 2026
e680422
cleaned pdhg.hpp and removed is_multi_gpu flag
Bubullzz Jun 17, 2026
6000b75
cleaner distributed handling
Bubullzz Jun 17, 2026
8c67f90
removed unused disrtibuted spmv in multi_gpu_engine
Bubullzz Jun 17, 2026
1f42904
cleaned pdhg a bit more
Bubullzz Jun 17, 2026
30319a0
pdhg review ready
Bubullzz Jun 17, 2026
2a14a4d
finished cuopt_cli
Bubullzz Jun 17, 2026
9052e31
cleaned initial_scaling
Bubullzz Jun 17, 2026
26d7f9e
pdlp and solve.cu
Bubullzz Jun 17, 2026
733334e
cnvergence info v2
Bubullzz Jun 17, 2026
56d5580
FINISHED
Bubullzz Jun 17, 2026
e2a36ab
style
Bubullzz Jun 17, 2026
45556da
moved mgpu engine up so graph gets destroyed before the mgpuengine co…
Bubullzz Jun 18, 2026
d5f1ce0
removed a useless inclyde and moved an assert up for coderabbit
Bubullzz Jun 18, 2026
9c1e345
added nccl_try everywhere
Bubullzz Jun 18, 2026
34196b1
style
Bubullzz Jun 18, 2026
758c4ad
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 23, 2026
380fd26
updated dependencies
Bubullzz Jun 23, 2026
d8a1fa8
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 24, 2026
a77d81b
removed pdlp_disable graph knob and moved use_distributed_pdlp to set…
Bubullzz Jun 24, 2026
cb55b7b
added warning if not fully nvlink-connected
Bubullzz Jun 24, 2026
1a5b941
style
Bubullzz Jun 24, 2026
e267972
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 25, 2026
df59a3d
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 25, 2026
368b3b3
removed not-working warning on non-nvlink system
Bubullzz Jun 25, 2026
6948bc5
style
Bubullzz Jun 25, 2026
1563cdc
updated assert to allow skeletal master problem to build
Bubullzz Jun 25, 2026
b14ffcc
style
Bubullzz Jun 26, 2026
d0de284
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 26, 2026
7bb6945
better compile option for kaminpar
Bubullzz Jun 26, 2026
67648da
Merged namespace changes here
Bubullzz Jun 29, 2026
81aa234
and update code to compile
Bubullzz Jun 29, 2026
58cb774
updated asserts to match skeletal data
Bubullzz Jun 29, 2026
21cdccc
style
Bubullzz Jun 29, 2026
fa88ed9
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 30, 2026
7b6f96a
Merge branch 'main' into cuD-PDLP
Bubullzz Jun 30, 2026
b7d4d91
updated moved includes
Bubullzz Jun 30, 2026
cdd9a4d
added host undo presolve
Bubullzz Jun 30, 2026
2531c24
cleaned presolve and distributed works with presolve
Bubullzz Jun 30, 2026
89c8878
re-enabled pre solver in pdlp__test
Bubullzz Jun 30, 2026
2fc3add
style
Bubullzz Jun 30, 2026
b85d44c
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 1, 2026
c5a4c5c
silence kaminpar warnings
Bubullzz Jul 1, 2026
e9db77a
merged main into cuD-PDLP
Bubullzz Jul 3, 2026
999b423
added char_to_var_type(h_var_types[i] in presolve. needed for compila…
Bubullzz Jul 3, 2026
20b9c6e
replace apply() with apply_presolve_from_op_problem() in presolve_tes…
Bubullzz Jul 3, 2026
cb4d5d6
propagate objective offset
Bubullzz Jul 3, 2026
e6b37e4
made pock_chambolle_scaling public and reduced the call in distribute…
Bubullzz Jul 3, 2026
b799d2b
reverted back pock chambolle to initial state as the split was not ne…
Bubullzz Jul 3, 2026
e8f321d
cleaned up ruiz
Bubullzz Jul 3, 2026
d108c1b
syle
Bubullzz Jul 4, 2026
1f53647
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 4, 2026
06fc37a
way better implementation of bound_objective_rescaling
Bubullzz Jul 4, 2026
96f2c3a
style
Bubullzz Jul 4, 2026
af6c4e3
updated a comment and added small fix to presolver->apply so it compiles
Bubullzz Jul 4, 2026
b137d1d
concentrated scaling
Bubullzz Jul 4, 2026
bf05a21
style
Bubullzz Jul 4, 2026
7e33f2f
multi_gpu_engine primitives are now based on vectors of raft::device_…
Bubullzz Jul 5, 2026
dd3ac27
removed specific broadcast_constraint_scaling_to_halo function to use…
Bubullzz Jul 5, 2026
c27c8a7
moved is_distributed_sub_pdlp to pdlp.cuh
Bubullzz Jul 5, 2026
c082586
distributed_pdlp_partitioner now takes an int
Bubullzz Jul 5, 2026
b355889
removed multi_gpu_partition_file support
Bubullzz Jul 5, 2026
50205fa
tuned down CUOPT_DISTRIBUTED_PDLP_NUM_GPUS max to 72
Bubullzz Jul 5, 2026
e194d09
removed all export/inport partition file logic
Bubullzz Jul 5, 2026
f14cc1b
replaced raft::sqrt with cuda::std::sqrt
Bubullzz Jul 5, 2026
4f3e897
use spans in partitionner.hpp
Bubullzz Jul 5, 2026
91b1be3
update comments in distr_max_sing_value
Bubullzz Jul 6, 2026
1a61616
added simple distributed_compute_primal_weight
Bubullzz Jul 6, 2026
aac76a2
updated scaling, step size and primal weight to run in the same call …
Bubullzz Jul 6, 2026
1f47074
style
Bubullzz Jul 6, 2026
1cd851d
update comment in pdlp.cu
Bubullzz Jul 6, 2026
3e4bae0
change sync call in distributed restart for engine sync call
Bubullzz Jul 6, 2026
57713c8
cleaner cupdlpx restart distributed and added allreduce_sum_inplace_t…
Bubullzz Jul 6, 2026
5f91915
style
Bubullzz Jul 6, 2026
8fb04ea
skip transpose check in distributed construction
Bubullzz Jul 6, 2026
b42b1e2
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 7, 2026
3b740b5
deleted reset_scaling state for a more streamlined distributed scaling
Bubullzz Jul 7, 2026
7b60523
cleaned initial_scaling a bit
Bubullzz Jul 7, 2026
c1d7e9f
style
Bubullzz Jul 7, 2026
41ebbbc
updated cuopt_cli to actually not materialize the full problem on gpu
Bubullzz Jul 7, 2026
2f36b83
style
Bubullzz Jul 7, 2026
ad1f9aa
return 0 in cuopt cli !
Bubullzz Jul 7, 2026
94b8be0
use device setters in cuoptt_cli
Bubullzz Jul 7, 2026
4719885
fixed initial_scaling
Bubullzz Jul 8, 2026
2daf4ba
added _MG do distributed test
Bubullzz Jul 8, 2026
8e31b8f
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 8, 2026
bb71569
cleaned rank_data.hpp
Bubullzz Jul 8, 2026
31e627c
actually use _MG_TEST *
Bubullzz Jul 8, 2026
fac853e
moved paretitoin_loader to distributed_utils, and removed surrounding…
Bubullzz Jul 8, 2026
38b5678
created dedicated presolve for op_problem to ensure no regression
Bubullzz Jul 8, 2026
390d66c
fixed small bug in cuopt cli
Bubullzz Jul 8, 2026
099adc3
moved mgpu tests to specific file to be ran in CI
Bubullzz Jul 8, 2026
33229cd
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 8, 2026
d9f5c4a
renamed distr tests
Bubullzz Jul 8, 2026
37e2776
style
Bubullzz Jul 8, 2026
24713ce
removed forward dec in third_party presolve
Bubullzz Jul 8, 2026
ba2b96e
unified third_party_presolve_result_t
Bubullzz Jul 8, 2026
117d977
fixed a bug in restart_strategy that caused batch mode to break
Bubullzz Jul 8, 2026
fa06593
added a print of topology in mgpu ci
Bubullzz Jul 8, 2026
99d1bd3
cleaned tpp a bit
Bubullzz Jul 8, 2026
a85d9e1
moved papilo include back to .cpp file and back to forward declaring …
Bubullzz Jul 8, 2026
a3b7be7
style
Bubullzz Jul 8, 2026
0d37018
dedup code for papilo part
Bubullzz Jul 8, 2026
e23aa6e
disable nccl_p2p in ci for potentially more robustness
Bubullzz Jul 8, 2026
8966a90
run ci with NCCL_DEBUG=INFO
Bubullzz Jul 9, 2026
447963a
download dataset in distributed
Bubullzz Jul 9, 2026
9a29076
mps based presolve
Bubullzz Jul 9, 2026
7db5e8d
moved helpers up and put back expects in constexpr
Bubullzz Jul 9, 2026
280991d
put constexpr back for compile
Bubullzz Jul 9, 2026
6c3a3b8
style
Bubullzz Jul 9, 2026
c40f3da
pulll different files for distributed ci
Bubullzz Jul 9, 2026
777d529
fix small bug in presolve
Bubullzz Jul 9, 2026
aa5ad5b
allow 1GB for shm in CI distributed tests
Bubullzz Jul 9, 2026
5d0cc10
reordered presolve to have clearer diff
Bubullzz Jul 9, 2026
70c0a4e
removed string include
Bubullzz Jul 9, 2026
7f3d3c5
final cleanup of third_party presolve omg
Bubullzz Jul 9, 2026
ad6e7a0
style
Bubullzz Jul 9, 2026
7448352
refactor dsitributed algorithms
Bubullzz Jul 10, 2026
fddcaba
remove nccl debug ingo
Bubullzz Jul 10, 2026
109cfaa
even better mgpu hehehehehe (implemented specific gather operations)
Bubullzz Jul 10, 2026
6af656e
clean diff in test_cpp_mgpu.sh
Bubullzz Jul 10, 2026
5436ea0
cleaned halo exchange funcs
Bubullzz Jul 10, 2026
25e1158
small fix for compilation
Bubullzz Jul 10, 2026
f1c6970
style
Bubullzz Jul 10, 2026
a1acfee
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 10, 2026
dc6d9e4
small fix test_cpp_mgpu
Bubullzz Jul 10, 2026
1102f9b
added distributed_parity_good_max test
Bubullzz Jul 10, 2026
bd58cc7
remove support for save_best_primal_so_far in distributed_pdlp
Bubullzz Jul 10, 2026
415b744
disable presolve for good max in test
Bubullzz Jul 10, 2026
4091bc7
cleaned distributed_algorithms up to max_singular value
Bubullzz Jul 10, 2026
1f87142
better max_singular value
Bubullzz Jul 10, 2026
1ab99f0
change sig of spmv_a/t_into
Bubullzz Jul 10, 2026
88273f4
style
Bubullzz Jul 10, 2026
9047001
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 10, 2026
019e731
renamed max sing value to max sing value squared
Bubullzz Jul 10, 2026
591fcd9
style
Bubullzz Jul 10, 2026
df87ba0
better asserts in problem.cu
Bubullzz Jul 10, 2026
6607141
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 10, 2026
311bc62
test on distributed_parity_cod105_max
Bubullzz Jul 10, 2026
fb8dcf6
better maximize support
Bubullzz Jul 10, 2026
eb3d026
rollback problem
Bubullzz Jul 10, 2026
360fd5c
Merge branch 'main' into cuD-PDLP
Bubullzz Jul 10, 2026
9410e5c
remove unused includes in pdlp_test
Bubullzz Jul 10, 2026
cd8092c
move non templated functions from mgpu.hpp to mgpu.cuh
Bubullzz Jul 11, 2026
85e170e
removed sqrt_inplace_op_t
Bubullzz Jul 11, 2026
d3de007
replace many calls with simpler for_each
Bubullzz Jul 11, 2026
0172220
multi_gpu_engine.hppp fully reviewed !! updated coments and order for…
Bubullzz Jul 11, 2026
6930cde
cleaned mgpu_engine.cu
Bubullzz Jul 11, 2026
f4ba2a7
removed chrono
Bubullzz Jul 11, 2026
046738b
removed logs in pdlp
Bubullzz Jul 11, 2026
7201c4b
updated comments and logs
Bubullzz Jul 11, 2026
176de0c
style
Bubullzz Jul 11, 2026
115b90d
added NCCL_TRY no throw
Bubullzz Jul 12, 2026
e7e1292
move opt_problem out of optionnal
Bubullzz Jul 12, 2026
cdc0c66
added sync stream in loop to prevent destruction before finish of rm…
Bubullzz Jul 12, 2026
0d3e900
plumb down is_sub_pdlp to initial_scaling in order to disable scaling
Bubullzz Jul 12, 2026
7e3e662
style
Bubullzz Jul 12, 2026
6bb29b6
final review of shard.* !!!!
Bubullzz Jul 12, 2026
0a06c20
style
Bubullzz Jul 12, 2026
410014c
removed dead code in initial scaling
Bubullzz Jul 12, 2026
16c88e5
updated comments in initial scaling. done !!
Bubullzz Jul 12, 2026
b41bd80
style
Bubullzz Jul 12, 2026
5455576
fixed PERNICIOUS bug in partition building
Bubullzz Jul 12, 2026
b892e4e
Merge branch 'cuD-PDLP' of https://github.com/Bubullzz/mostovoi_cuopt…
Jul 12, 2026
2a3d2b0
added set_scalar_on_master_and_shards for distr algo and restart stra…
Bubullzz Jul 12, 2026
5c543d6
style
Bubullzz Jul 12, 2026
33fc071
better restart strategy
Bubullzz Jul 12, 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
8 changes: 8 additions & 0 deletions .github/workflows/multi_gpu_cpp_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ on:
script:
type: string
default: "ci/test_cpp_multi_gpu.sh"
container-options:
description: |
Extra 'docker run' options. NCCL allocates its inter-GPU buffers in
/dev/shm; the container default of 64 MB is too small and makes NCCL
setup fail with "No space left on device", so bump it with --shm-size.
type: string
default: "--shm-size=1g"
continue-on-error:
description: "Treat failures as non-blocking (useful while the MG suite is maturing)."
type: boolean
Expand All @@ -63,5 +70,6 @@ jobs:
node_type: ${{ inputs.node_type }}
arch: ${{ inputs.arch }}
container_image: ${{ inputs.container_image }}
container-options: ${{ inputs.container-options }}
script: ${{ inputs.script }}
continue-on-error: ${{ inputs.continue-on-error }}
20 changes: 20 additions & 0 deletions ci/test_cpp_multi_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ rapids-print-env
rapids-logger "Check GPU usage"
nvidia-smi

# Dump the GPU topology matrix
rapids-logger "Check GPU topology"
nvidia-smi topo -m

# Multi-GPU tests are meaningless on a single device — fail loudly rather than
# passing a run that never exercised NCCL.
GPU_COUNT=$(nvidia-smi -L | wc -l)
Expand All @@ -74,6 +78,17 @@ if [ "${GPU_COUNT}" -lt 2 ]; then
exit 1
fi

# Distributed PDLP parity tests use a small set of git-ignored MPS instances.
# Download only those direct-MPS fixtures here: downloading the full PDLP suite
# falls back to netlib conversion when S3 credentials are not available, and that
# path needs gcc (not present in this test environment).
rapids-logger "Download datasets"
python benchmarks/linear_programming/utils/get_datasets.py -datasets graph40-40
python benchmarks/linear_programming/utils/get_datasets.py -datasets ex10

RAPIDS_DATASET_ROOT_DIR="$(realpath datasets)"
export RAPIDS_DATASET_ROOT_DIR

# Locate the installed gtest binaries (same search order as ci/run_ctests.sh).
installed_test_location="${INSTALL_PREFIX:-${CONDA_PREFIX:-/usr}}/bin/gtests/libcuopt/"
devcontainers_test_location="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/../cpp/build/latest/gtests/libcuopt/"
Expand All @@ -97,6 +112,11 @@ if [ "${#mg_tests[@]}" -eq 0 ]; then
exit 0
fi

# PHB topology on the 2-GPU runner: disable direct GPU peer access (see topo above).
# NCCL then uses the SHM transport, which needs a larger /dev/shm than the 64 MB
# container default — the workflow launches the container with --shm-size for this.
export NCCL_P2P_DISABLE=1

EXITCODE=0
for gt in "${mg_tests[@]}"; do
test_name=$(basename "${gt}")
Expand Down
4 changes: 2 additions & 2 deletions ci/validate_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ PYDISTCHECK_ARGS=(
if [[ "${package_dir}" == "python/libcuopt" ]]; then
if [[ "${RAPIDS_CUDA_MAJOR}" == "12" ]]; then
PYDISTCHECK_ARGS+=(
--max-allowed-size-compressed '690Mi'
--max-allowed-size-compressed '960Mi'
)
else
PYDISTCHECK_ARGS+=(
--max-allowed-size-compressed '550Mi'
--max-allowed-size-compressed '800Mi'
)
fi
elif [[ "${package_dir}" != "python/cuopt" ]] && \
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- msgpack-numpy==0.4.8
- msgpack-python==1.2.1
- myst-parser
- nccl >=2.19
- ninja
- notebook
- numba-cuda>=0.22.1
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- msgpack-numpy==0.4.8
- msgpack-python==1.2.1
- myst-parser
- nccl >=2.19
- ninja
- notebook
- numba-cuda>=0.22.1
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-133_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- msgpack-numpy==0.4.8
- msgpack-python==1.2.1
- myst-parser
- nccl >=2.19
- ninja
- notebook
- numba-cuda>=0.22.1
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- msgpack-numpy==0.4.8
- msgpack-python==1.2.1
- myst-parser
- nccl >=2.19
- ninja
- notebook
- numba-cuda>=0.22.1
Expand Down
4 changes: 4 additions & 0 deletions conda/recipes/libcuopt/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ cache:
- libcusparse-dev
- libnvjitlink-dev
- libboost-devel
- nccl >=2.19
- tbb-devel
- zlib
- bzip2
Expand Down Expand Up @@ -127,6 +128,7 @@ outputs:
- libcudss-dev >=0.7,<0.8
- libcusparse-dev
- libnvjitlink-dev
- nccl >=2.19
- openssl
- c-ares
- libuuid
Expand All @@ -141,6 +143,7 @@ outputs:
- librmm =${{ minor_version }}
- cuda-nvrtc
- libcudss >=0.7,<0.8
- nccl >=2.19
- openssl
- c-ares
- libuuid
Expand Down Expand Up @@ -189,6 +192,7 @@ outputs:
- libcublas
- libcudss-dev >=0.7,<0.8
- libcusparse-dev
- nccl >=2.19
- openssl
- c-ares
- libgrpc >=1.78.0,<1.80.0a0
Expand Down
65 changes: 65 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,44 @@ create_logger_macros(CUOPT "cuopt::default_logger()" include/cuopt)

find_package(CUDSS REQUIRED)

# ##################################################################################################
# - NCCL (multi-GPU distributed PDLP) -------------------------------------------------------------
# NCCL is shipped via the conda env; no canonical CMake config target, so look it
# up by name in the standard lib paths (plus CONDA_PREFIX as a hint).
set(NCCL_HINT_PREFIXES "")
if (DEFINED ENV{CONDA_PREFIX} AND NOT "$ENV{CONDA_PREFIX}" STREQUAL "")
list(APPEND NCCL_HINT_PREFIXES "$ENV{CONDA_PREFIX}")
endif ()
find_path(NCCL_INCLUDE_DIR
NAMES nccl.h
HINTS ${NCCL_HINT_PREFIXES}
PATH_SUFFIXES include
)
find_library(NCCL_LIBRARY
NAMES nccl
HINTS ${NCCL_HINT_PREFIXES}
PATH_SUFFIXES lib lib64
)
if (NOT NCCL_INCLUDE_DIR OR NOT NCCL_LIBRARY)
message(FATAL_ERROR "NCCL not found. Looked in ${NCCL_HINT_PREFIXES}. Install nccl-dev / libnccl-dev in the active env.")
endif ()
add_library(nccl_external UNKNOWN IMPORTED GLOBAL)
set_target_properties(nccl_external PROPERTIES
IMPORTED_LOCATION "${NCCL_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${NCCL_INCLUDE_DIR}"
)
message(STATUS "Using NCCL: ${NCCL_LIBRARY}")

# ##################################################################################################
# - KaMinPar (multi-threaded partitioning for distributed PDLP) ------------------------------------
# Brought in the RAPIDS way (rapids_cpm_find): uses an installed KaMinPar (deb/rpm/conda,
# discovered via its CMake config) if present, otherwise builds the pinned source via CPM.
include(cmake/thirdparty/get_kaminpar.cmake)
if (NOT TARGET KaMinPar::KaMinPar)
message(FATAL_ERROR "KaMinPar::KaMinPar was not made available by get_kaminpar.cmake")
endif ()
message(STATUS "Using KaMinPar (distributed PDLP graph partitioner)")

# ##################################################################################################
# - gRPC and Protobuf setup -----------------------------------------------------------------------

Expand Down Expand Up @@ -555,6 +593,32 @@ target_include_directories(cuopt
target_link_libraries(cuopt PRIVATE $<TARGET_FILE:PSLP>)
add_dependencies(cuopt PSLP)

# Link KaMinPar by file to avoid export dependency tracking (mirrors PSLP above).
# KaMinPar is a from-source static library fully embedded into libcuopt.so; it is never
# installed (INSTALL_KAMINPAR OFF) and consumers of cuopt::cuopt never use it, so it must
# not leak into cuopt's exported link interface (otherwise rapids_export fails with
# "target KaMinPar is not in any export set"). libKaMinPar.a is self-contained (the
# kaminpar-common OBJECT lib is archived into it); we only need its public headers
# (<kaminpar.h>, which pulls in stdlib + TBB) at compile time.
target_include_directories(cuopt SYSTEM PRIVATE
$<TARGET_PROPERTY:KaMinPar::KaMinPar,INTERFACE_INCLUDE_DIRECTORIES>)
# partitioner.cpp includes <kaminpar.h>. Because KaMinPar is linked by file, cuopt
# does NOT inherit KaMinPar's PUBLIC compile definitions, so we must replicate the ones that
# affect what <kaminpar.h> compiles to:
# * TBB_PREVIEW_GLOBAL_CONTROL - <kaminpar.h> includes <tbb/global_control.h>, which older
# TBB gates behind this macro.
# * KAMINPAR_64BIT_EDGE_IDS - selects EdgeID = uint64 in <kaminpar.h>. MUST stay in sync
# with the KAMINPAR_64BIT_* options in get_kaminpar.cmake;
# otherwise the public API types (e.g. copy_graph's span<>
# widths) mismatch the prebuilt archive => undefined refs.
target_compile_definitions(cuopt PRIVATE TBB_PREVIEW_GLOBAL_CONTROL KAMINPAR_64BIT_EDGE_IDS)
target_link_libraries(cuopt PRIVATE $<TARGET_FILE:KaMinPar::KaMinPar>)
# Real (non-imported) target only exists when KaMinPar is built from source via CPM;
# force it to build before cuopt since it is EXCLUDE_FROM_ALL.
if (TARGET KaMinPar)
add_dependencies(cuopt KaMinPar)
endif ()

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

Expand Down Expand Up @@ -605,6 +669,7 @@ target_link_libraries(cuopt
${CUDSS_LIB_FILE}
PRIVATE
${CUOPT_PRIVATE_CUDA_LIBS}
nccl_external
$<$<BOOL:${CUOPT_ENABLE_GRPC}>:protobuf::libprotobuf>
$<$<BOOL:${CUOPT_ENABLE_GRPC}>:gRPC::grpc++>
)
Expand Down
95 changes: 95 additions & 0 deletions cpp/cmake/thirdparty/get_kaminpar.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on

# Multi-threaded graph partitioner for distributed PDLP.
# Uses rapids_cpm_find so a system / conda / .deb install of KaMinPar (which ships a
# CMake config package exporting KaMinPar::KaMinPar) is used when available, and
# otherwise the pinned source is cloned and built via CPM. KaMinPar depends on TBB,
# which cuOpt already requires (see find_package(TBB) for papilo).
function(find_and_configure_kaminpar)
set(oneValueArgs VERSION PINNED_TAG)
cmake_parse_arguments(PKG "" "${oneValueArgs}" "" ${ARGN})

# Silence the (many) warnings from KaMinPar and its bundled third-party
# dependencies (KaHyPar, KaGen, growt, ...). They are compiled from pinned
# upstream source we do not maintain, so their diagnostics only drown out
# cuOpt's own build output. Appending -w here is function-scoped: the CPM
# add_subdirectory below inherits these flags, but cuOpt's targets (compiled
# in the parent scope with -Wall -Werror) are unaffected. A system/conda
# install of KaMinPar builds nothing, so the flag is simply unused there.
string(APPEND CMAKE_C_FLAGS " -w")
string(APPEND CMAKE_CXX_FLAGS " -w")

# NOTE: KaMinPar is intentionally NOT added to cuopt's BUILD/INSTALL export sets.
# It is a from-source static dependency that is fully embedded into libcuopt.so and
# never installed (INSTALL_KAMINPAR OFF below). Registering it in cuopt-exports would
# both break export generation ("target KaMinPar is not in any export set") and emit a
# bogus find_dependency(KaMinPar) into the installed cuopt config. It is linked by file
# in cpp/CMakeLists.txt (mirroring PSLP) so it stays out of cuopt's export interface.
rapids_cpm_find(KaMinPar ${PKG_VERSION}
GLOBAL_TARGETS KaMinPar::KaMinPar
CPM_ARGS
GIT_REPOSITORY https://github.com/KaHIP/KaMinPar.git
GIT_TAG ${PKG_PINNED_TAG}
EXCLUDE_FROM_ALL
OPTIONS
"KAMINPAR_BUILD_APPS OFF"
"KAMINPAR_BUILD_TOOLS OFF"
"KAMINPAR_BUILD_TESTS OFF"
"KAMINPAR_BUILD_BENCHMARKS OFF"
"KAMINPAR_BUILD_EXAMPLES OFF"
"KAMINPAR_BUILD_DISTRIBUTED OFF"
# KaMinPar defaults this to ON, which injects `-march=native -mtune=native`
# (and propagates the same flag to its bundled KaHyPar / KaGen via
# KAHYPAR_ENABLE_ARCH_COMPILE_OPTIMIZATIONS / KAGEN_USE_MARCH_NATIVE).
# That bakes in whatever ISA the build host happens to support
# (e.g. AVX-512 on Sapphire Rapids), which then SIGILLs on any test
# host with a leaner CPU. Force generic codegen instead.
"KAMINPAR_BUILD_WITH_MTUNE_NATIVE OFF"
# Timers use global state and force single-threaded use of the library
# interface; disable so cuOpt can call the partitioner freely.
"KAMINPAR_ENABLE_TIMERS OFF"
# Avoid an extra hard dependency on Google Sparsehash.
"KAMINPAR_BUILD_WITH_SPARSEHASH OFF"
# cuOpt's TBB is discovered via a legacy find that only exposes TBB::tbb
# (no TBB::tbbmalloc target); disable KaMinPar's optional tbbmalloc use.
"KAMINPAR_ENABLE_TBB_MALLOC OFF"
# Large LP constraint graphs can exceed 2^31 directed edges.
"KAMINPAR_64BIT_EDGE_IDS ON"
"INSTALL_KAMINPAR OFF"
# Build KaMinPar as a STATIC library that is embedded into libcuopt.so (linked
# by file in cpp/CMakeLists.txt). The wheel build configures with
# BUILD_SHARED_LIBS=ON; without this override KaMinPar would build a separate
# libKaMinPar.so that is neither embedded nor shipped in the wheel. Forcing PIC
# is required so the static objects can be linked into the shared libcuopt.so
# (KaMinPar's KaMinParCommon OBJECT lib otherwise lacks -fPIC).
"BUILD_SHARED_LIBS OFF"
"CMAKE_POSITION_INDEPENDENT_CODE ON"
)

if(KaMinPar_ADDED)
message(VERBOSE "CUOPT: Using KaMinPar located in ${KaMinPar_SOURCE_DIR}")
# KaMinPar's public header pulls in <tbb/global_control.h>. On older TBB releases
# that header is gated behind TBB_PREVIEW_GLOBAL_CONTROL (KaMinPar upstream assumes a
# newer oneTBB and never defines it). Define it on KaMinParCommon PUBLIC so it
# propagates to all KaMinPar translation units (KaMinPar links KaMinParCommon PUBLIC).
# Harmless on newer oneTBB where global_control is no longer a preview feature.
# Also force PIC on every KaMinPar target (the KaMinParCommon OBJECT library does not
# reliably inherit CMAKE_POSITION_INDEPENDENT_CODE) so the static archive can be
# embedded into the shared libcuopt.so.
foreach(_kaminpar_tgt KaMinParCommon KaMinPar KaMinParIO)
if(TARGET ${_kaminpar_tgt})
set_target_properties(${_kaminpar_tgt} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
endforeach()
if(TARGET KaMinParCommon)
target_compile_definitions(KaMinParCommon PUBLIC TBB_PREVIEW_GLOBAL_CONTROL)
endif()
else()
message(VERBOSE "CUOPT: Using KaMinPar located in ${KaMinPar_DIR}")
endif()
endfunction()

find_and_configure_kaminpar(VERSION 3.7.3 PINNED_TAG v3.7.3)
Loading