From cf314021069a3c66b501423b52756693ad4b9225 Mon Sep 17 00:00:00 2001 From: cyw Date: Sun, 2 Nov 2025 09:28:31 +0100 Subject: [PATCH] Documentation for GPU use --- README.md | 2 +- docs/pages.jl | 1 + docs/src/citing.md | 12 ++++++++++++ docs/src/index.md | 3 ++- docs/src/user_guide_gpu.md | 24 ++++++++++++++++++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 docs/src/user_guide_gpu.md diff --git a/README.md b/README.md index fe38bdc..6af6142 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ This is the common documentation repository for the Clarabel solver. It contain * For the Julia implementation, go [here](https://github.com/oxfordcontrol/Clarabel.jl). * For the C and C++ interfaces to the Rust implementation, go [here](https://github.com/oxfordcontrol/Clarabel.cpp). * For the R interface to the Rust implementation, go [here](https://github.com/oxfordcontrol/clarabel-r). - +* For the GPU implementation and use, go [here](https://github.com/oxfordcontrol/Clarabel.jl/tree/CuClarabel). diff --git a/docs/pages.jl b/docs/pages.jl index 8ff6cfe..97ea99b 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -61,6 +61,7 @@ pages = [ "Chordal Decomposition" => "user_guide_chordal.md", "Problem Data Updates" => "user_guide_data_updating.md", "Linear System Solvers" => "user_guide_linsolvers.md", + "GPU acceleration" => "user_guide_gpu.md" ], #"Method" => "method.md", "Examples" => examples, diff --git a/docs/src/citing.md b/docs/src/citing.md index 38c2028..17ed8a4 100644 --- a/docs/src/citing.md +++ b/docs/src/citing.md @@ -12,6 +12,18 @@ If you find Clarabel useful in your work, please consider citing one or more of ``` A preprint is available [here](http://arxiv.org/abs/2405.12762). +If you use GPU-based Clarabel to solve large-scale problems: +``` +@misc{CuClarabel, + title={CuClarabel: GPU Acceleration for a Conic Optimization Solver}, + author={Yuwen Chen and Danny Tse and Parth Nobel and Paul Goulart and Stephen Boyd}, + year={2024}, + eprint={2412.19027}, + archivePrefix={arXiv}, + primaryClass={math.OC} +} +``` +A preprint is available [here](https://arxiv.org/abs/2412.19027). If you use Clarabel to solve SDPs with decomposable structure: diff --git a/docs/src/index.md b/docs/src/index.md index 823d823..3c94c65 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -19,12 +19,13 @@ Clarabel is available in either a native [Julia](https://julialang.org/) or a na * __Infeasibility detection__: Infeasible problems are detected using using a homogeneous embedding technique. * __Arbitrary precision types__: You can solve problems with any floating point precision, e.g. Float32 or Julia's BigFloat type in Julia and f32 or f64 types in Rust. * __Open Source__: Our code is available on GitHub and distributed under the Apache 2.0 License. The Julia implementation is [here](https://github.com/oxfordcontrol/Clarabel.jl). The Rust implementation and Python interface is [here](https://github.com/oxfordcontrol/Clarabel.rs). +* __GPU acceleration__: GPU-accelerated Clarabel is now available in Julia, with support also in Python. The GPU implementation is [here](https://github.com/oxfordcontrol/Clarabel.jl/tree/CuClarabel). ## Credits The following people are involved in the development of Clarabel: * [Paul Goulart](http://users.ox.ac.uk/~engs1373/) (main development, maths and algorithms) -* Yuwen Chen (maths and algorithms) +* [Yuwen Chen](https://yuwenchen95.github.io/) (main development, maths and algorithms) All contributors are affiliated with the Control Group of the [Department of Engineering Science](http://www.eng.ox.ac.uk/) at the [University of Oxford](http://ox.ac.uk/). If this project is useful for your work please consider diff --git a/docs/src/user_guide_gpu.md b/docs/src/user_guide_gpu.md new file mode 100644 index 0000000..a2741e0 --- /dev/null +++ b/docs/src/user_guide_gpu.md @@ -0,0 +1,24 @@ +### [GPU Acceleration](@id gpu-accelerated-solver) + +Clarabel now has a GPU version called `CuClarabel` in Julia, with easy access in Python (via [PythonCall.jl](https://github.com/JuliaPy/PythonCall.jl)) and [CVXPY](https://www.cvxpy.org/). Since the GPU solver is built on [CUDSS](https://developer.nvidia.com/cudss) sparse linear system solver (accessed via [CUDSS.jl](https://github.com/exanauts/CUDSS.jl)), it is currently supported only on NVIDIA GPUs. + +### Use in Julia +You can download the `CuClarabel` branch of `Clarabel.jl` via +``` +pkg> add https://github.com/oxfordcontrol/Clarabel.jl/tree/CuClarabel +``` +or +``` +using Pkg +Pkg.add(url="https://github.com/oxfordcontrol/Clarabel.jl", rev="CuClarabel") +``` + +Then, you can enable GPU acceleration in Julia by setting the linear subsolver `direct_solve_method` to `:cudss` or `:cudss-mixed`: +| `direct_solve_method` | notes | +| :---------------------- | :----------------------------------------------------------------------------------------------------- | +| `cudss` | Enable GPU acceleration of Clarabel (in `Float64`) | +| `cudss-mixed` | Enable GPU acceleration of Clarabel with mixed precision (`Float32` + `Float64`) | + +### Use in Python +Details of how to use in Python can be found [here](https://github.com/oxfordcontrol/Clarabel.jl/tree/CuClarabel). +