pulp icon indicating copy to clipboard operation
pulp copied to clipboard

CuOpt Solver Integration

Open Iroy30 opened this issue 8 months ago • 11 comments

What is your question

Nvidia cuOpt is looking forward to adding a cuOpt solver integration to pulp. We already have a PR developed and tested locally - needs some fine tuning and final updates. While we do that we were going through the contribution page and we have a few questions:

  1. cuOpt is GPU accelerated. Is there GPUs available for running tests on CI for cuOpt PR? If not, what do you recommend for the PR
  2. cuOpt is Linux Platform based and not supported on Windows and MacOS. Does that mean we disable those CI tests?
  3. As per the contribution instructions, we have currently forked the pulp repo and integrated cuOpt as a solver backend. We plan to create a PR to this repo. Is there any other steps or procedure that needs to be followed?

Iroy30 avatar Apr 28 '25 19:04 Iroy30

@bbozkaya

Iroy30 avatar Apr 28 '25 19:04 Iroy30

@Iroy30 @bbozkaya I have talked to Andrew Mason about this let me know if you need any extra discussion/ guidence @pchtsp is doing most of the work on pulp ATM but I would suggest something like the HiGHS interface https://github.com/coin-or/pulp/blob/d4763a873a799212949ebd138199c1f41c686042/pulp/apis/highs_api.py

Would be ideal especially the use of a separate project highspy in that case to contain the binaries and the build.

stumitchell avatar May 05 '25 22:05 stumitchell

Thanks! Here is the PR #837

Iroy30 avatar May 07 '25 05:05 Iroy30

@Iroy30 how do we install cuopt for testing?

stumitchell avatar May 07 '25 23:05 stumitchell

The testing is a challenge. Getting the cuOPT binaries should be no problem, but having access to the right hardware is an issue. We're working on that. In the meantime, I indicated that if they can do extensive testing themselves and provide the logs from their own internal CI showing that everything seems to work, then I guess we could probably accept the PR. It's a low risk, since this interface will anyway only be used by people who have gotten cuOPT working and they will understand that it is "beta," hopefully reporting back any problems. It won't break anything for anyone else.

tkralphs avatar May 09 '25 15:05 tkralphs

I left some comments on the PR: https://github.com/coin-or/pulp/pull/837 @tkralphs you mean it is not possible to replicate the required hardware for cuopt with github actions? I do not know if this is relevant:

https://github.blog/changelog/2024-07-08-github-actions-gpu-hosted-runners-are-now-generally-available/ and https://medium.com/@tajinder.singh1985/exploring-github-nvidia-powered-gpu-hosted-runner-32b172a92c7e

pchtsp avatar May 13 '25 07:05 pchtsp

Now that you mention that, I remember the announcement of GPU-hosted runners. It seemed to me they were only available to paid accounts, but I can't find that anywhere. In any case, I suppose NVIDIA should have a paid account and should have access. In that case, I guess the setup could be added to the PR. @Iroy30 , what do you think?

tkralphs avatar May 13 '25 16:05 tkralphs

Indeed, it seems that the GPU Github runners are only for paying customers. I have access to a GPU cluster and also have a GPU that will work for testing on my laptop if it comes to it.

tkralphs avatar May 13 '25 18:05 tkralphs

I created a discussion in github actions to confirm we cannot get it for free: https://github.com/orgs/community/discussions/159224

pchtsp avatar May 14 '25 11:05 pchtsp

Is it ok to go with @tkralphs' suggestion that we do the extensive testing on our end and share results and logs with you for your review and approval?

bbozkaya avatar May 14 '25 15:05 bbozkaya

Yes, it's okay. Although you first need to make the requested changes to the PR. Thanks!

pchtsp avatar May 15 '25 07:05 pchtsp

I'm closing this issue as the solver is already available.

pchtsp avatar Aug 06 '25 07:08 pchtsp