NVIDIA / NVIDIA/cuopt

[FEA] Static-link gRPC, protobuf, abseil, tbb, libgomp into libcuopt.so

Open
#1,203 5 comments 0 reactions 1 assignee View on GitHub

@akifcorduk is already working on this.

Since May 12, 2026.

awaiting response feature request
Dominant language
Cuda
Stars
1k
Forks
233
Avg merge
4d 4h
Merged PRs (30d)
95

Description

Is your feature request related to a problem? Please describe.

libcuopt.so currently has dynamic dependencies on several non-CUDA, non-RAPIDS shared libraries — libgrpc++.so, libgrpc.so, libgpr.so, libprotobuf.so, multiple libabsl_*.so, libtbb.so, libgomp.so. These get installed automatically when users use the conda channel, but they create friction for users who don't:

  1. Java distribution (cuopt-java, PR #1192): The classifier JAR can safely bundle RAPIDS libs (rmm, rapids_logger, mps_parser), CUDA toolkit is excluded per convention, but bundling gRPC/protobuf/abseil is unsafe due to global state and ABI instability conflicting with user-app native deps. So users have to install these via the system package manager or conda.
  2. Standalone C/C++ users: Same friction — every consumer needs the full transitive dep set, not just libcuopt.
  3. Container images: Each base image variant needs the full lib set installed.

Describe the solution you'd like

Have the C++ build static-link the following into libcuopt.so:

  • libgrpc++, libgrpc, libgpr (gRPC C++)
  • libprotobuf (protocol buffers C++)
  • libabsl_* (Abseil; gRPC dep)
  • libtbb (Intel TBB)
  • libgomp (OpenMP runtime)

What stays dynamic:

  • CUDA toolkit libs (libcublas, libcusparse, libcudss, libcublasLt, libcudart, libnvJitLink) — user-installed for licensing/size reasons
  • RAPIDS libs (librmm, librapids_logger) — bundled in JAR or conda-installed
  • libmps_parser — sibling library in this repo
  • C/C++ runtime (libstdc++, libgcc_s, libc, etc.) — system

Describe alternatives you've considered

  1. Bundle in each downstream artifact (Java JAR, future Rust/Go crates) — risky for gRPC/protobuf/abseil because they have global registries; two copies of libprotobuf in one process can crash or corrupt data. TensorFlow has been bitten by this repeatedly.
  2. Document the transitive deps as system prerequisites — current state. Works but adds friction for non-conda users.

Static linking is the standard fix used by TensorFlow's libtensorflow.so and ONNX Runtime's libonnxruntime.so, both of which static-link their gRPC/protobuf/abseil deps.

Additional context

Confirmed dynamic deps via ldd cpp/build/libcuopt.so:
```
libtbb.so.12, libgrpc++.so.1.78, libgrpc.so.52, libgpr.so.52,
libprotobuf.so.33.5.0, libabsl_*.so.2601.0.0 (many),
libgomp.so.1
```

Related: #1202 (C API stats getters — separate concern), PR #1192 (cuopt-java, which prompted this).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.