Skip to content

Commit e588b47

Browse files
sunqmfishjojo
authored andcommitted
pytblis install doc
1 parent f312b85 commit e588b47

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

source/user/install.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pip install pyscf-forge
3434
Some other features are only maintained as [Extensions](user/extensions) to PySCF.
3535
:::
3636

37+
To achieve better performance, additional install options are described in
38+
[Advanced build options](#advanced-build-options)
39+
3740
## Build from source with pip
3841

3942
If you're interested in a new feature that's not included in the latest release or you simply
@@ -383,6 +386,22 @@ ExternalProject_Add(libcint
383386
...
384387
```
385388

389+
### Install an optimized einsum backend
390+
391+
Many modules in PySCF rely on `numpy.einsum` to perform tensor contractions.
392+
However, `numpy.einsum` is not efficient due to the lack of parallel execution.
393+
[TBLIS](https://github.com/devinamatthews/tblis) provides an optimized
394+
implementation for tensor contractions. It can deliver performance improvements
395+
of 10x to 100x than `numpy.einsum`.
396+
397+
TBLIS can be used as a drop-in backend for einsum operations. The backend can be
398+
installed via the `pytblis` package:
399+
```bash
400+
pip install pytblis
401+
```
402+
Once pytblis is installed, PySCF will automatically detect and use it as the
403+
backend for einsum operations.
404+
386405
## Troubleshooting
387406

388407
* `error: command 'cmake' failed`

0 commit comments

Comments
 (0)