pyscf / gpu4pyscf

A plugin to use Nvidia GPU in PySCF package
GNU General Public License v3.0
117 stars 21 forks source link

conda package? or a different way to install custensor? #64

Closed sef43 closed 7 months ago

sef43 commented 9 months ago

Hello,

Thanks for this great package! I can install this using pip. However installing cutensor in the way specified is not ideal: python -m cupyx.tools.install_library --cuda 11.x --library cutensor This installs the lib to ~/.cuda/... I would like to be able to install it into a conda environment. e.g. I can do this:

conda create -n gpu4pysfc
conda activate  gpu4pysfc
conda install -c conda-forge pysfc cudatoolkit
pip install gpu4pyscf-cuda11x

And all packages will be in the conda env.

To run the code It needs cutensor: If I install cutensor with conda it does not work. If I install cutensor with python -m cupyx.tools.install_library --cuda 11.x --library cutensor it does work but cutensor is installed to /home. If I try and change it to --prefix=$CONDA_PREFIX it also does not work.

The easiest solution from a user perspective would be for a conda package to exist, I appreciate that is a lot of work. It is something you have planned?

wxj6000 commented 9 months ago

We don't have the plan to publish a conda package at this point. conda environment is convenient. But unfortunately it is no longer free to all users. With the limited contributors, we can only maintain the PyPi release pipeline for now.

The cutensor installation python -m cupyx.tools.install_library --cuda 11.x --library cutensor is introduced by CuPy. It is still the easiest way to install cutensor. Alternatively, one can install the binary package using apt or yum similar to cuDNN and NCCL. https://docs.cupy.dev/en/stable/install.html#installing-cudnn-and-nccl

wxj6000 commented 9 months ago

cutensor will be loaded from PyPi wheel when cupy v13.0 is released. And it also supports cutensor 2.0. @sunqm https://github.com/cupy/cupy/pull/7025

wxj6000 commented 7 months ago

I am closing this issue because cutensor 2.0 is now released in PyPi. And we support cutensor 2.0 now. https://github.com/pyscf/gpu4pyscf/pull/90