Spacy/Thinc not building properly with gpu support.
It seems that Thinc is not building properly with GPU support.
- I have validated that my CUDA install is correct and working as expected.
- I have validated that my cupy install is correct and working as expected. I validated I can execute simple commands using it.
>>>import cupy as cp >>> x = cp.arange(6).reshape(2, 3).astype('f') >>> x - The spacy/thinc install seems to be working as expected. No errors. However, after install, I cannot access thinc.neural.gpu_ops
ModuleNotFoundError: No module named 'thinc.neural.gpu_ops' - I verified I am doing a complete reinstall of thinc
pip3 install --upgrade --force-reinstall thinc
I have set the following environment variables.
CUDA9=1
CUDA_HOME=/Developer/NVIDIA/CUDA-9.1
PATH=/Developer/NVIDIA/CUDA-9.1/bin
Any thoughts? Could there be an issue using version 9.1?
Thanks,
Michael
Your Environment
- Operating System: MacOS High Sierra 10.13.3
- CUDA version: 9.1.128
- spaCy version: 2.0.7
- thinc version: 6.10.2
- Platform: Darwin-17.4.0-x86_64-i386-64bit
- Python version: 3.6.4
- Models: en
I found at least one issue:
Thinc: setup.py Line 161
cudaconfig = {'home':home, 'nvcc':nvcc, 'include': os.path.join(home, 'include'), 'lib64': os.path.join(home, 'lib64')}
for k, v in cudaconfig.items():
if not os.path.exists(v):
print('Warning: The CUDA %s path could not be located in %s' % (k, v))
return None
return cudaconfig
My installation does not have a lib64 directory. Just lib. To bypass, I created a lib64 symlink to lib. However, no luck.
I have the standard mac CUDA install from NVIDIA.
Do you have Nvidia GPU? CUDA doesn't work on AMD or Intel HD/Iris GPUs, which are shipped on latest macs. It is possible to install and launch CUDA, however. It just won't work.
If you do have Nvidia GPU, make sure that it is supported: https://developer.nvidia.com/cuda-gpus
If you do have Nvidia GPU and it is supported, do you have built-in GPU or are you using external GPU?
I have a MacBookPro Retina 2012 that comes with the NVIDIA GeForce GT 650M. I had validated that it is CUDA compatible.
I have also validated CUDA is installed correctly and operational on my machine.
I can call and execute commands with cupy just fine.
Thanks! But I don't think my hardware or CUDA install is the problem here.
I have the same issue under Ubuntu with an Nvidia Titan X GPU:
- Python version: 2.7.12
- Platform: Linux-4.4.0-104-generic-x86_64-with-Ubuntu-16.04-xenial
- spaCy version: 2.0.9
- Models: en_core_web_md
cupy builds just fine and I can run ops using it. thinc fails to build gpu_ops in the neural package.
This should be fixed now. Please open a new issue if you still can't get the GPU to work on the new spacy-nightly.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.