Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh committed Sep 19, 2023
1 parent a7d7f6b commit 8200193
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
13 changes: 13 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ Installing PARDISO
# or conda install -c conda-forge pypardiso
# or pip install tdgl[pardiso]
GPU acceleration
----------------

For users with an NVIDIA or AMD GPU, ``tdgl`` can be accelerated using the `CuPy <https://cupy.dev/>`_ library.
First install the appropriate version of ``cupy`` for your GPU hardware and driver version
(see installation instructions `here <https://docs.cupy.dev/en/stable/install.html>`_).
Then set the ``sparse_solver`` attribute of :class:`tdgl.SolverOptions` to ``"cupy"``.
Due to overheads related to transferring data between the CPU and GPU, it is expected that ``cupy`` will provide
a speedup only for models with large meshes and/or models that include screening.
Please open a `GitHub issue <https://github.com/loganbvh/py-tdgl/issues>`_ if you have any problems using ``tdgl`` with ``cupy``.
Note that ``cupy`` support for AMD GPUs is `currently experimental <https://docs.cupy.dev/en/stable/install.html#using-cupy-on-amd-gpu-experimental>`_.

Verify the installation
-----------------------

Expand Down
12 changes: 6 additions & 6 deletions tdgl/solver/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ class SolverOptions:
given solve iteration before giving up.
adaptive_time_step_multiplier: The factor by which to multiple the time
step ``dt`` for each adaptive solve retry.
sparse_solver: One of "superlu", "umfpack", "pardiso", or "cupy".
"umfpack" requires suitesparse, which can be installed via conda,
and scikit-umfpack, which can be installed via pip. "pardiso"
sparse_solver: One of ``"superlu"``, ``"umfpack"``, ``"pardiso"``, or ``"cupy"``.
``"umfpack"`` requires suitesparse, which can be installed via conda,
and scikit-umfpack, which can be installed via pip. ``"pardiso"``
requires an Intel CPU and the pypardiso package, which can be
installed via pip or conda. "cupy" requires and NVIDIA GPU
and the CuPy Python package.
installed via pip or conda. ``"cupy"`` requires a GPU and the
CuPy Python package, which can be installed via pip.
terminal_psi: Fixed value for the order parameter in current terminals.
field_units: The units for magnetic fields.
current_units: The units for currents.
output_file: Path to an HDF5 file in which to save the data.
If the file name already exists, a unique name will be generated.
If ``output_file`` is ``None``, the solver results will not be saved
to disk.
pause_on_interrupt: Pause the simulation in the event of a KeyboardInterrupt.
pause_on_interrupt: Pause the simulation in the event of a ``KeyboardInterrupt``.
save_every: Save interval in units of solve steps.
progress_interval: Minimum number of solve steps between progress bar updates.
include_screening: Whether to include screening in the simulation.
Expand Down

0 comments on commit 8200193

Please sign in to comment.