Installing cupy

Hi,

I am using the python module OPT. I would like to use the GPU implementation of some functions. It seems it requires the module cupy. I tried to install cupy (pip install cupy) but I get an error:

ERROR: CUDA could not be found on your system.

How can I do?
Thank you

Antoine

for GPU implementation of OPT, see: ot.gpu — POT Python Optimal Transport 0.8.1.0 documentation

Hi Antoine,

To take advantage of GPUs you’ll need to:

  • Request a GPU from Slurm. The simplest example is the --gres=gpu:1 option to srun or sbatch. You can verify an interactive job has GPUs available by running the nvidia-smi command and seeing GPU(s) listed.
  • Make sure you have the required version of CUDA loaded as a module. You can get a list of available CUDA module versions with the command module avail CUDA/ . You’ll need the same module loaded at compile and runtime.