Hi! I want to implement skimage's structural_similarity using cupy and I am running into some problems. I am running Linux Mint 18.1 using CUDA 9.0 and anaconda python 3.6. My installation using
conda install -c conda-forge cupy seems to have succeeded, as I can execute cupy code just fine. However, I cannot import any filters from
from cupyx.scipy.ndimage import uniform_filter, gaussian_filter
from cupyx.scipy.ndimage import uniform_filter, gaussian_filter ImportError: cannot import name 'uniform_filter'
I am assuming the version is wrong, because when I execute
conda list | grep cupy, I get:
cupy 6.0.0 py36h686fdb1_0
How can I force it to version 8.5 or higher?
Thanks for the suggestions!
I tried installing into a new environment, which did install version 8.5 but got another error:
So I assume there is indeed a conflict in my conda env. The fresh environment defaults to cudatoolkit 11.0. Forcing 9.0 already generates conflicts in the fresh env.
Package cudatoolkit conflicts for: cudatoolkit=9.0 cupy -> cudatoolkit[version='10.0|10.0.*|10.1|10.1.*|11.0|11.0.*|11.1|11.1.*|11.2|11.2.*|10.2|10.2.*|9.2|9.2.*|>=10.0.130,<10.1.0a0|>=9.2,<9.3.0a0|>=9.0,<9.1.0a0|>=8.0,<9.0a0|8.0.*|9.0.*'] cupy -> cudnn[version='>=220.127.116.11,<9.0a0'] -> cudatoolkit[version='10.0.*|10.1.*|10.2.*|11.*|>=10.1,<10.2|>=9.0,<9.1|>=9.2,<9.3|>=10.0,<10.1|>=10.2,<10.3|9.2.*']The following specifications were found to be incompatible with your system: - feature:/linux-64::__glibc==2.23=0 - cupy -> __glibc[version='>=2.17|>=2.17,<3.0.a0'] Your installed version is: 2.23
This looks to me that there is a configuration problem. If I read this right it requires glibc >2.17, which I have, but it does not recognize it? I dont know enough about that to tell the difference between linux-64 and cupy here. But it looks like this should not be an issue
I uninstalled cupy again from my own env and then reinstalled. This is the printout before installing:
conda install -c conda-forge cupy Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environment location: /home/user/anaconda3/envs/py36 added / updated specs: - cupy The following NEW packages will be INSTALLED: cudnn pkgs/main/linux-64::cudnn-7.6.5-cuda9.0_0 cupy pkgs/main/linux-64::cupy-6.0.0-py36h686fdb1_0 fastrlock conda-forge/linux-64::fastrlock-0.5-py36h831f99a_1 nccl pkgs/main/linux-64::nccl-1.3.5-cuda9.0_0 The following packages will be UPDATED: certifi pkgs/main::certifi-2020.12.5-py36h06a~ --> conda-forge::certifi-2020.12.5-py36h5fab9bb_1 The following packages will be SUPERSEDED by a higher-priority channel: ca-certificates pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-ha878542_0 openssl pkgs/main::openssl-1.1.1j-h27cfd23_0 --> conda-forge::openssl-1.1.1j-h7f98852_0
If I force to version 8.5 the terminal locks without any printout (most likely because there are too many conflicts)
I also tried the new release from pip:
$ python -m pip install cupy-cuda90 Collecting cupy-cuda90 Downloading cupy_cuda90-8.6.0-cp36-cp36m-manylinux1_x86_64.whl (319.1 MB) |████████████████████████████████| 319.1 MB 102 kB/s Requirement already satisfied: fastrlock>=0.3 in /home/user/anaconda3/envs/py36/lib/python3.6/site-packages (from cupy-cuda90) (0.6) Requirement already satisfied: numpy>=1.15 in /home/user/anaconda3/envs/py36/lib/python3.6/site-packages (from cupy-cuda90) (1.18.5) Installing collected packages: cupy-cuda90 Successfully installed cupy-cuda90-8.6.0
It seems we're getting somewhere, but now I get the error:
Traceback (most recent call last): File "/home/user/anaconda3/envs/py36/lib/python3.6/site-packages/cupy/__init__.py", line 20, in <module> from cupy import core # NOQA File "/home/user/anaconda3/envs/py36/lib/python3.6/site-packages/cupy/core/__init__.py", line 1, in <module> from cupy.core import core # NOQA File "cupy/core/core.pyx", line 1, in init cupy.core.core File "/home/user/anaconda3/envs/py36/lib/python3.6/site-packages/cupy/cuda/__init__.py", line 5, in <module> from cupy.cuda import compiler # NOQA File "/home/user/anaconda3/envs/py36/lib/python3.6/site-packages/cupy/cuda/compiler.py", line 12, in <module> from cupy.cuda import function File "cupy/cuda/function.pyx", line 1, in init cupy.cuda.function File "cupy/core/_carray.pyx", line 1, in init cupy.core._carray File "cupy/core/internal.pyx", line 1, in init cupy.core.internal File "cupy/cuda/memory.pyx", line 1, in init cupy.cuda.memory ModuleNotFoundError: No module named 'fastrlock'
$ python -m pip install fastrlock Requirement already satisfied: fastrlock in /home/user/anaconda3/envs/py36/lib/python3.6/site-packages (0.6)
cupy-cuda90, I think your conda env got corrupted again, so try again with a fresh conda env, and then do
pip install cupy-cuda90see what happens
Hi , I am Ameya Chawla currently pursuing my B.Tech in Computer Science and Engineering .
I read about your organization in GSOC 2021 and looking forward to work with your organization .
I have also made a pull request "Implemented the Hyperbolic Sine Function for matrix #4944"
Please can you guide further how should start working .
Please can you share a sample template for the proposal to be made for Google Summer of Code Application..
@povinsahu1909 As you can see on CuPy's comparison table, many SciPy sparse features are not implemented in CuPy yet. You can choose the ones you think would be most helpful and can be done during the period. We can discuss the candidates you choose in the draft proposal.
As for the proposal's contents, we don't have our proposal template so following the one prescribed by GSoC is fine. We're especially interested in the "Deliverables" part of it.
@leofang Thanks for your feedback! I was able to verify what causes the conflict. Apparently the combination of cudatoolkit==9.0 and python==3.6 does not allow for cupy versions higher than 6.0. When just using python 3.6 I can get the install working with cudatoolkit=10.1, but then the driver makes a problem. I am running on cuda driver 384.130.
Steps to reproduce:
conda create -n cupy_env python=3.6.8 cudatoolkit=9.0 conda activate cupy_env conda install -c conda-forge cupy
Unfortunately that means I cannot use cupy, as I have the limitations of my system still. I currently cannot upgrade to a newer driver nor cuda version due to other software relying on this configuration.
************************************************** *** WARNING: CUDA version is too old: 9000 *** WARNING: CUDA 9.2 or newer is required ************************************************************ * CuPy Configuration Summary * ************************************************************ Build Environment: Include directories: ['/tmp/pip-req-build-kzlcpuh5/install/../cupy/_core/include/cupy/cub', '/tmp/pip-req-build-kzlcpuh5/install/../cupy/_core/include', '/usr/local/cuda-9.0/include'] Library directories: ['/usr/local/cuda-9.0/lib64'] nvcc command : ['/usr/local/cuda-9.0/bin/nvcc'] hipcc command : (not found) Environment Variables: CFLAGS : (none) LDFLAGS : (none) LIBRARY_PATH : (none) CUDA_PATH : /usr/local/cuda-9.0 NVTOOLSEXT_PATH : (none) NVCC : (none) HIPCC : (none) ROCM_HOME : (none) Modules: cuda : No (version 9000) -> The library is installed but not supported. ERROR: CUDA could not be found on your system. Please refer to the Installation Guide for details: https://docs.cupy.dev/en/stable/install.html
cudatoolkit=9.0from conda-forge is because the lowest cuda we provide is 9.2
cudatoolkit=9.0you got is from the default (Anaconda's) channel, which we have no control over
pip install "cupy==8.6.0". This works even if you're using a conda env. But remember to clean up all prior installations.