# Need help wrapping cuOpt in julia

**URL:** https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808
**Category:** Optimization (Mathematical)
**Created:** [June 11, 2025, 2:15pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808 "2025-06-11T14:15:06Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)
#### Post date: [June 11, 2025, 2:15pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/1 "2025-06-11T14:15:06Z")

</div>

NVIDIA recently open-sourced their [cuOpt solver suite](https://github.com/NVIDIA/cuopt). The source code is mostly C++, and it has a C API.

I’m looking into wrapping that in Julia and setting up a JuMP/MOI interface so we can use cuOpt through JuMP. I have never wrapped a C library before (I imagine it will take a combination of Clang, BinaryBuilder and a \_jll), let alone one that needs a GPU to run.

If anyone has skills related to this and would be open to help me, I’d very much appreciate it 🙏🙏  
I have access to a GPU machine a pretty much anything but Docker, and I’m happy to do the heavy lifting, what I really need is guidance on the overall wrapping / building process.

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [June 11, 2025, 4:04pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/2 "2025-06-11T16:04:52Z")

</div>

I don’t know the first thing about C or C++ but I just want to say that I wholeheartedly support this initiative! Good luck, keep us posted 🙏

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 11, 2025, 7:37pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/3 "2025-06-11T19:37:39Z")

</div>

First step is to be able to install the solver in Julia.

The place to start is to look at [GitHub - JuliaPackaging/Yggdrasil: Collection of builder repositories for BinaryBuilder.jl](https://github.com/JuliaPackaging/Yggdrasil)

As an example, heres the script that builds SCS with a GPU:

> **[Yggdrasil/S/SCS\_GPU at master · JuliaPackaging/Yggdrasil](https://github.com/JuliaPackaging/Yggdrasil/tree/master/S/SCS_GPU)**
>
> Collection of builder repositories for BinaryBuilder.jl - JuliaPackaging/Yggdrasil

The binarybuilder docs have some tips and tricks for building: [Home · BinaryBuilder.jl](https://docs.binarybuilder.org/stable/)

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [June 11, 2025, 7:37pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/4 "2025-06-11T19:37:43Z")

</div>

Also @amontoison might be a good person to talk to

---

<div class="post-metadata">

### Author: ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)
#### Post date: [June 11, 2025, 9:14pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/5 "2025-06-11T21:14:53Z")

</div>

I was at Stanford a few months ago and discussed with Chris Maes (lead developer of cuOpt).  
Based on the current implementation and our discussion, I don’t really see the advantage compared to cu-pdlp or HiGHS with the support of it.

JuMP / MOI is also not GPU-oriented so I am not sure what you want to achieve at the end except maybe a proof-of-concept or testing the accuracy.

If you want to work on it, be aware that it is not a small task.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 11, 2025, 9:20pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/6 "2025-06-11T21:20:06Z")

</div>

Another big thing to consider is the availability of CI testing. (I know we could sort something with JuliaGPU.) I have no plans to work on this for jump-dev unless NVIDIA come to the party somewhat with $ or hardware.

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [June 11, 2025, 9:22pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/7 "2025-06-11T21:22:01Z")

</div>

> [@amontoison](#):
>
> I don’t really see the advantage compared to cu-pdlp or HiGHS with the support of it.

I’m more curious about their discrete algorithms on GPU, MILP solver + routing algorithms.

---

<div class="post-metadata">

### Author: ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)
#### Post date: [June 11, 2025, 9:27pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/8 "2025-06-11T21:27:42Z")

</div>

To the best of my knowledge, the MILP / routing algorithms are runned on CPU internally.  
Only very specific components of the code are on GPU.

Source: private discussion with Chris

---

<div class="post-metadata">

### Author: ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)
#### Post date: [June 11, 2025, 10:48pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/9 "2025-06-11T22:48:30Z")

</div>

> [@amontoison](#):
>
> If you want to work on it, be aware that it is not a small task.

Yes, I would expect so 😅 I’m still trying to compile it from source.

TBH, figuring out the software aspect of it is as motivating to me as being able to call cuOpt from julia.

---

<div class="post-metadata">

### Author: ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)
#### Post date: [June 13, 2025, 8:53pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/10 "2025-06-13T20:53:31Z")

</div>

Progress update: I am still having trouble building cuopt from source ☹

My fallback right now is to build a Julia client API for the cuOpt server API.  
The intended workflow would be something like

1. [outside of julia] start your own cuOpt server  
(I’ll be doing that using their container)
2. [inside julia] wrap the cuOpt client API into an `AbstractOptimizer`, which make look like

```julia
using JuMP
using cuOptServer

model = JuMP.Model(() -> cuOptServer.Optimizer(<options>))
# build model ...
JuMP.optimize!(model)

```

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 13, 2025, 9:21pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/11 "2025-06-13T21:21:24Z")

</div>

I dont know what the API is for their server, but this might be helpful:

> **[GitHub - jump-dev/NEOSServer.jl: A Julia interface for the NEOS Optimisation Server](https://github.com/jump-dev/NEOSServer.jl)**
>
> A Julia interface for the NEOS Optimisation Server

---

<div class="post-metadata">

### Author: ![chris-maes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris-maes/32/217347_2.png) [@chris-maes](https://discourse.julialang.org/u/chris-maes)
#### Post date: [June 16, 2025, 5:36pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/12 "2025-06-16T17:36:18Z")

</div>

Hi all,

I’m from the cuOpt team. I’m glad to hear there is interest in getting cuOpt interfaced with JuMP and Julia. My colleague Rajesh Gandham is working on an interface now and could certainly use the community’s help. Stay tuned for further discussion from him on this.

@amontoison Just to clear up a few misconceptions earlier in this thread.

1. We do believe that cuOpt has an advantage over cuPDLP (which is currently integrated into HiGHs). We spent some time in our 25.05 release optimizing PDLP. This can be seen in the latest benchmarks comparing both solvers: plato.asu.edu/ftp/lpfeas.html . We are continuing to improve cuOpt all the time.

2. cuOpt’s MILP solver is a hybrid solver running on both the GPU and the CPU. Currently, bound strengthening and primal heuristics are run on the GPU, while branch and bound is run on the CPU. Although, our MILP solver is new, we still hope it will be useful.

odow Regarding CI, within the cuOpt Github repo we currently run CI on GPUs. We can work together to figure out how to run cuOpt’s Julia / JuMP interface on CI with GPUs.

@mtanneau I’m sorry you ran into trouble compiling cuOpt from source. Several others reported this same issue. We recommend that you manage all your dependencies with conda. See our documentation on building from source for more info.

We do hope that members of the julia / JuMP community will benefit from GPU acceleration of LP/MILP problems through cuOpt. We look forward to collaborating with you all.

Thanks,  
Chris

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 16, 2025, 8:14pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/13 "2025-06-16T20:14:52Z")

</div>

> [@chris-maes](#):
>
> odow Regarding CI, within the cuOpt Github repo we currently run CI on GPUs. We can work together to figure out how to run cuOpt’s Julia / JuMP interface on CI with GPUs.

Great! I told Rajesh on slack that the easiest approach is to open souce the Julia package under the NVIDIA org in an unfinished state Then we can answer some code review questions, and you can probably sort CI on your hosted runners?

---

<div class="post-metadata">

### Author: ![mtanneau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtanneau/32/17787_2.png) [@mtanneau](https://discourse.julialang.org/u/mtanneau)
#### Post date: [June 16, 2025, 8:29pm UTC](https://discourse.julialang.org/t/need-help-wrapping-cuopt-in-julia/129808/14 "2025-06-16T20:29:07Z")

</div>

Thank you Chris for the information!

Great to hear that NVIDIA is working on an official Julia interface 🙂 I suppose that makes my effort obsolete 🙃 I would be happy to beta-test the interface and help with the JuMP integration.

I did make some progress on building a Julia-based self-hosted client API (following the lines of the python one), and got around the building from source issues by running a self-hosted container.
