Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ pip install torch --index-url https://download.pytorch.org/whl/cpu # unless you
pip install skala
```

Or using Conda (Mamba):

```bash
mamba install -c conda-forge skala "pytorch=*=cpu*"
```

Run an SCF calculation with Skala for a hydrogen molecule:

```python
Expand All @@ -47,12 +53,25 @@ Go to [microsoft.github.io/skala](https://microsoft.github.io/skala) for a more

## Getting started (GPU support)

Install using Pip:


### Conda (via Mamba,includes CUDA toolkit, Torch, CuPy)

Supports CUDA version 11, 12 or 13. You can find the most recent CUDA version that is supported on your system using `nvidia-smi`.

```bash
cu_version=12 #or 11 or 13 depending on your CUDA version
mamba env create -n skala -f environment-gpu.yml "cuda-version==${cu_version}.*" skala
mamba activate skala
pip install --no-deps "gpu4pyscf-cuda${cu_version}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version}x>=0.4,<1"
```

### pip (bring your own CUDA runtime):
The most recent pytorch version supports CUDA version 12.6, 12.8 or 13.0. You can find the most recent CUDA version that is supported on your system using `nvidia-smi`.
```bash
cu_version=128 #or 126 or 130 depending on your CUDA version
pip install torch cupy --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}"
pip install torch "cupy-cuda${cu_version:0:2}x" skala --extra-index-url "https://download.pytorch.org/whl/cu${cu_version}"
pip install --no-deps "gpu4pyscf-cuda${cu_version:0:2}x>=1.0,<2" "gpu4pyscf-libxc-cuda${cu_version:0:2}x>=0.4,<1"
pip install skala
```
Run an SCF calculation with Skala for a hydrogen molecule on GPU:

Expand Down
9 changes: 8 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,19 @@ If you prefer to install Skala from the source code, you can clone the repositor
mamba activate skala
pip install -e .

where `environment-cpu.yml` can be replaced for `environment-gpu.yml` for gpu support (CUDA 12) with gpu4pyscf, in which case gpu4pyscf needs to be separately installed *after creating the environment* via
where `environment-cpu.yml` can be replaced with `environment-gpu.yml` for gpu support (specify CUDA version with `cuda_version=<version>`) with gpu4pyscf, in which case gpu4pyscf needs to be separately installed *after creating the environment* via (for CUDA 12)

.. code-block:: bash

pip install --no-deps 'gpu4pyscf-cuda12x>=1.0,<2' 'gpu4pyscf-libxc-cuda12x>=0.4,<1'


or (for CUDA 13)

.. code-block:: bash

pip install --no-deps 'gpu4pyscf-cuda13x>=1.0,<2' 'gpu4pyscf-libxc-cuda13x>=0.4,<1'

To install the development dependencies, you can run:

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion environment-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- cuda-toolkit
- cupy
- cutensor
- cuda-version ==12.*
- cuda-version
# Testing and development
- pre-commit
- pytest
Expand Down
Loading