Skip to content

Commit efb5df1

Browse files
authored
Merge pull request ERGO-Code#2245 from ERGO-Code/docs-gpu
Docs GPU
2 parents 56c149c + d5099ea commit efb5df1

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
44

55
[compat]
6-
Clang = "0.14, 0.17"
6+
Clang = "0.14, 0.17, 0.18"
77
Documenter = "0.27"

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ Documenter.makedocs(
5353
"guide/index.md",
5454
"guide/basic.md",
5555
"guide/further.md",
56-
"guide/advanced.md"
56+
"guide/advanced.md",
57+
"guide/highs-gpu.md"
5758
],
5859
"Data structures" => Any[
5960
"structures/index.md",

docs/src/guide/highs-gpu.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# [HiGHS on a GPU](@id highs-gpu)
2+
3+
From HiGHS v1.10.0, its first order primal-dual LP (PDLP) solver [cuPDLP-C](https://github.com/COPT-Public/cuPDLP-C) can be run on an NVIDIA GPU under Linux and Windows. However, to achieve this, CUDA utilities must be installed and HiGHS must be built locally using CMake, as described below.
4+
5+
### PDLP: A health warning
6+
7+
First order solvers for LP are still very much "work in progress". Although impressive results have been reported, these are often to lower accuracy than is achieved by simplex and interior point solvers, have been obtained using top-of-the-range GPUs, and not achieved for all problem classes. Note that, due to PDLP using internal scaling and relative termination conditions, a solution deemed optimal by PDLP may not be accepted as optimal by HiGHS. The user should consider the infeasibility data returned by HiGHS to decide whether the solution is acceptable.
8+
9+
If you use the HiGHS PDLP solver, in the first instance it is recommended that you increase the primal and dual feasibility tolerances to `1e-4`, since these are the default values used natively by cuPDLP-C, and will result in the algorithm terminating much sooner.
10+
11+
### Requirements
12+
13+
CUDA Toolkit and CMake.
14+
15+
A [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) installation is required, along with the matching NVIDIA driver. Please install both following the instructions on NVIDIA's website.
16+
17+
HiGHS must be build locally with CMake.
18+
19+
Make sure the CUDA compiler `nvcc` is installed by running
20+
21+
```
22+
nvcc --version
23+
```
24+
25+
### Build HiGHS with GPU support
26+
27+
HiGHS must be built, from the root directory, with
28+
29+
```
30+
cmake -S. -Bbuild -DCUPDLP_GPU=ON
31+
cmake --build build --parallel
32+
```
33+
34+
This uses [FindCUDAToolkit](https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html) to find a CUDA installation locally.
35+
36+
#### Find CUDA
37+
38+
If CUDA is not found automatically, there is an extra option `-DCUPDLP_FIND_CUDA=ON`, to be used with `-DCUPDLP_GPU=ON`, which instead uses `cuPDLP-C`'s `FindCUDAConf.cmake`.
39+
40+
This requires the environment variable `CUDA_HOME` to be set to the directory with the CUDA installation. Having set this, run
41+
42+
```
43+
cmake -S. -Bbuild -DCUPDLP_GPU=ON -DCUPDLP_FIND_CUDA=ON
44+
cmake --build build --parallel
45+
```
46+
47+
to build HiGHS.

0 commit comments

Comments
 (0)