Note
GPU-enabled primal-dual hybrid gradient (PDHG) is available only on Linux x86-64 (linux64) and Linux arm64 (armlinux64) with NVIDIA hardware. It is not available on Compute Server or Instant Cloud. A full CUDA installation is not required, but compatible NVIDIA drivers are required. Gurobi recommends evaluating on an NVIDIA H100 or newer when possible. (See Supported GPU Platforms.)
Gurobi's current GPU support is centered on the PDHG algorithm. For LPs, PDHG can run on the GPU when enabled. For MIP/MILP models, PDHG applies only to the initial root relaxation; the rest of the MIP solve is not currently GPU-accelerated through this feature. Any active Gurobi license can be used.
Requirements
To run GPU-enabled PDHG, you will need:
- a supported Linux platform (x86-64 or arm64)
- an NVIDIA GPU with a supported Compute Capability for the build you plan to install
- compatible NVIDIA drivers
- an active Gurobi license
- the GPU-enabled Gurobi build; if you use Python, a GPU-enabled
gurobipywheel
For the current release, the supported Compute Capability ranges depend on the CUDA-enabled build you install. See Supported GPU Platforms for the current compatibility matrix.
1. Check that your GPU and drivers are compatible
Run:
nvidia-smi
This command should show the NVIDIA driver version, the supported CUDA runtime version, and the GPU model(s). You can use this command and the information it provides to confirm that your GPU model is an NVIDIA GPU and supports the CUDA version you plan to use. To verify the GPU's Compute Capability, you can cross-reference the reported GPU model with NVIDIA's CUDA GPU Compute Capability page.
If nvidia-smi is missing or does not detect the GPU, resolve the NVIDIA installation before proceeding.
2. Download and install the GPU-enabled Gurobi build
Download the GPU-enabled installation package from Gurobi's downloads page under Gurobi Optimizer for GPUs. Choose the build that matches your platform and CUDA version. This is separate from the standard CPU-only download. Install it the same way you would install the corresponding CPU-only build for that platform.
3. Install GPU-enabled gurobipy if you use Python
GPU-enabled Python builds are not installed with a plain pip install gurobipy. Instead, download the matching wheel from the Gurobi Optimizer for GPUs section of the downloads page. The wheel must match your Python version, Linux architecture, and CUDA version. Then, install the wheel. For example:
pip install /path/to/gurobipy-13.0.1+cu129-...whl
After installation, verify the package version:
pip list | grep gurobipy
You should see a version with a +cu... suffix, for example gurobipy 13.0.1+cu129. This suffix indicates that the CUDA-enabled wheel is installed. If the installed version does not include a +cu... suffix, you are not using a GPU-enabled Python build.
4. Set the required parameters before solving
Set the following parameters before solving your model:
Optional PDHG-related parameters include:
Note that Crossover controls how Gurobi transforms the interior solution from barrier or PDHG into a basic solution, which can materially affect total runtime.
5. Confirm that Gurobi is using the GPU
To verify GPU usage, solve an LP or MILP, then inspect the Gurobi log. If the GPU is used, the log should include:
- a line indicating an NVIDIA GPU has been identified, beginning with
GPU model: - a line indicating that PDHG has started on the GPU, beginning with
Start PDHG on GPU
If you do not see those messages, the most common causes are:
- the standard CPU build was installed instead of the GPU-enabled build
- the installed
gurobipywheel is not a+cu...build - the platform is unsupported
- the NVIDIA driver or GPU is incompatible
-
MethodandPDHGGPUwere not set to the required values - the job is running on Compute Server or Instant Cloud
What performance should you expect?
Performance is model-dependent. In the article Using GPUs to Solve LPs vs. MIPs: What’s the Difference?, the key message is that GPU-enabled PDHG is most relevant for large LPs and for MIPs whose runtime is dominated by the initial root LP relaxation. Most LPs and MIPs today will still perform better with established simplex or barrier methods.
A second important point is that faster PDHG iterations do not automatically translate into lower end-to-end runtime. PDHG and barrier may both require additional time in crossover to obtain a basic solution, and that extra time can reduce or erase the benefit of faster GPU-enabled PDHG iterations on some models. Benchmarking on your own models is the best way to evaluate whether GPU-enabled PDHG helps your application.
Where GPU acceleration is used
In the current release, GPU acceleration for PDHG is available on supported systems. For LPs, that means PDHG can solve the LP on the GPU. For MIP/MILP models, the relevant GPU-enabled step is in solving the root LP relaxation. Using PDHG on the GPU for node-relaxation LPs deeper in the branch-and-bound tree is not supported at this time. Broader GPU acceleration of the branch-and-bound framework remains an active area of research.
FAQ
Do I need a special license to use GPU-enabled Gurobi?
No. Any active Gurobi license works with the GPU feature.
Do I need to install CUDA separately?
No. A full CUDA installation is not required. Compatible NVIDIA drivers are required.
What hardware should I test on?
Gurobi recommends testing on an NVIDIA H100 or newer when possible.
Can I use GPU-enabled Gurobi in a container?
Yes. The GPU-enabled package can be deployed in a container like any other package, provided the container has access to compatible NVIDIA hardware and drivers.
Is GPU-enabled PDHG available on Windows or macOS?
Not in the current release. GPU-enabled PDHG is currently supported only on linux64 and armlinux64.
Is GPU-enabled PDHG available on Compute Server or Instant Cloud?
No. GPU-enabled PDHG is not available on Compute Server or Instant Cloud.