Skip to content

Commit 7249b2d

Browse files
authored
fix docs related to cudss (#334)
1 parent 60cef4e commit 7249b2d

File tree

4 files changed

+55
-26
lines changed

4 files changed

+55
-26
lines changed

docs/src/api/python.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ of the proper format, SCS will attempt to convert them. The
4545
:code:`use_indirect` setting switches between the sparse direct
4646
:ref:`linear_solver` (the default) or the sparse indirect solver. If the MKL
4747
Pardiso direct solver for SCS is :ref:`installed <python_install>` then it can
48-
be used by setting :code:`mkl=True`. If the GPU indirect solver for SCS is
49-
:ref:`installed <python_install>` and a GPU is available then it can be used by
50-
setting :code:`gpu=True`. The remaining fields are explained in
48+
be used by setting :code:`mkl=True`. If a GPU solver for SCS is :ref:`installed
49+
<python_install>` and a GPU is available then it can be used by setting
50+
:code:`gpu=True`. For the direct GPU solver based on cuDSS set
51+
:code:`use_indirect=False`. The remaining fields are explained in
5152
:ref:`settings`.
5253

5354
Then to solve the problem call:

docs/src/install/c.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ The CMake build-system exports two CMake targets called :code:`scs::scsdir` and
5656
:code:`scs::scsindir` as well as a header file :code:`scs.h` that defines the
5757
API.
5858

59+
MKL
60+
"""
61+
5962
If `MKL
6063
<https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-mkl-for-dpcpp/top.html>`_
6164
is installed in your system and the :code:`MKLROOT` environment variable is
@@ -66,6 +69,9 @@ MKL compiler flags might not be right for your system and may need to be
6669
<https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html>`_).
6770

6871

72+
GPU
73+
"""
74+
6975
If you have a GPU and CUDA toolkit installed, along with the
7076
`cuDSS <https://developer.nvidia.com/cudss>`_ library, you can compile SCS
7177
with cuDSS support using CMake. First, ensure that the :code:`CUDA_PATH` and
@@ -78,8 +84,11 @@ with cuDSS support using CMake. First, ensure that the :code:`CUDA_PATH` and
7884
7985
Currently cuDSS only supports 32 bit integers (for sparse matrix idicies) so
8086
:code:`DDLONG=OFF` is mandatory.
81-
This will build and install the cuDSS linear solver with target :code:`scs::scscudss`.
87+
This will build and install the cuDSS linear solver with target
88+
:code:`scs::scscudss`.
8289

90+
Importing
91+
"""""""""
8392
The libraries can be imported using the find_package CMake command and used
8493
by calling target_link_libraries as in the following example:
8594

@@ -154,10 +163,10 @@ binaries in the out folder corresponding to the GPU version. Note that the GPU
154163
make gpu DLONG=0
155164
out/run_tests_gpu_indirect
156165
157-
Finally, to compile and test the :ref:`cuDSS solver <cudss>` you need to have
158-
CUDA toolkit, the :code:`nvcc` compiler, and
159-
`cuDSS <https://developer.nvidia.com/cudss>`_ library installed.
160-
Then set :code:`CUDA_PATH` and :code:`CUDSS_PATH` and execute
166+
Finally, to compile and test the :ref:`cuDSS solver <cudss_solver>` you need to
167+
have CUDA toolkit, the :code:`nvcc` compiler, and `cuDSS
168+
<https://developer.nvidia.com/cudss>`_ library installed. Then set
169+
:code:`CUDA_PATH` and :code:`CUDSS_PATH` and execute
161170

162171
.. code:: bash
163172

docs/src/install/python.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,38 @@ You can also install directly from source
1515
1616
git clone --recursive https://github.com/bodono/scs-python.git
1717
cd scs-python
18-
python -m pip install --verbose .
18+
python -m pip install .
19+
20+
MKL
21+
"""
1922

2023
If you have MKL, you can install the MKL Pardiso interface using
2124

2225
.. code:: bash
2326
24-
python -m pip install --verbose -Csetup-args=-Dlink_mkl=true .
27+
python -m pip install -Csetup-args=-Dlink_mkl=true .
28+
29+
See :ref:`here <python_interface>` for how to enable MKL when solving. MKL is
30+
typically faster than the built-in linear system solver.
31+
32+
GPU
33+
"""
34+
35+
If you have a GPU and cuDSS installed you can install the GPU direct sparse
36+
solver using
37+
38+
.. code:: bash
39+
40+
python -m pip install -Csetup-args=-Dlink_cudss=true -Csetup-args=-Dint32=true .
41+
42+
See :ref:`here <python_interface>` for how to enable the GPU when solving. The
43+
sparse direct GPU solver is typically very fast.
44+
45+
See `here <https://colab.research.google.com/drive/1POCgDNFg8fycHMI9T9N6V3iHFhXRthjn?usp=sharing>`_ for an example colab where the cuDSS version of SCS, along with
46+
required dependencies, is installed and used.
2547

26-
See :ref:`here <python_interface>` for how to enable MKL when solving. MKL is typically
27-
faster than the built-in linear system solver.
48+
Testing
49+
"""""""
2850

2951
To test that SCS installed correctly, and you have pytest installed, run
3052

@@ -43,7 +65,7 @@ You can install with OpenMP parallelization support using
4365
4466
python legacy_setup.py install --scs --openmp
4567
46-
You can install the GPU interface using (the GPU solver is no longer recommended)
68+
You can install the GPU indirect solver using
4769

4870
.. code:: bash
4971

docs/src/linear_solver/index.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,21 @@ Sparse GPU indirect method
102102

103103
The above linear solvers all run on CPU. We also have support for a GPU version
104104
of the indirect solver, where the matrix multiplies are all performed on the
105-
GPU.
105+
GPU. Usually the direct GPU solver will be faster than this solver.
106106

107-
.. _cudss:
107+
.. _cudss_solver:
108108

109109
Sparse GPU direct method
110110
^^^^^^^^^^^^^^^^^^^^^^^^^
111111

112-
This is a linear solver that uses the `cuDSS<https://developer.nvidia.com/cudss>`_
113-
library to solve the linear system on the GPU. It is similar to the direct
114-
solver, but uses the calls to cuDSS library to perform the analysis, numerical
115-
(re-)factorization and subsequent solves. According to its documentation
116-
117-
> reordering (a major part of the analysis phase) is executed on the host,
118-
> while symbolic factorization (another part of the analysis phase),
119-
> numerical factorization and solve are executed on the GPU.
120-
121-
As the newest addition to SCS this solver is still under development and not
122-
as well battle-tested as the other solvers.
112+
This is a linear solver that uses the `cuDSS
113+
<https://developer.nvidia.com/cudss>`_ library to solve the linear system on
114+
the GPU. It is similar to the direct solver, but uses the calls to cuDSS
115+
library to perform the analysis, numerical (re-)factorization and subsequent
116+
solves. According to its documentation reordering (a major part of the analysis
117+
phase) is executed on the host while symbolic factorization (another part of
118+
the analysis phase), numerical factorization, and solve are executed on the
119+
GPU.
123120

124121
.. _new_linear_solver:
125122

0 commit comments

Comments
 (0)