Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thinc GPU capability on Windows - fails to compile #51

Closed
ivmreg opened this issue Feb 13, 2018 · 3 comments · Fixed by #117
Closed

Thinc GPU capability on Windows - fails to compile #51

ivmreg opened this issue Feb 13, 2018 · 3 comments · Fixed by #117

Comments

@ivmreg
Copy link

ivmreg commented Feb 13, 2018

It looks like Thinc has some hard time making GPU computation available if used on Windows.

Similar issues were raised in spaCy and thinc:
explosion/spaCy#1745
#50

It seems related in how the build is set-up in setup.py:
https://github.com/explosion/thinc/blob/master/setup.py#L56

Based on quick search, others are struggling with this as well:
rbgirshick/py-faster-rcnn#11

Some more info (they came to a working solution there):
cudamat/cudamat#46 (comment)

Will research a bit more later.

@honnibal
Copy link
Member

Sorry this is hard. I don't use Windows, so am not of much help. You might try the wheels here? https://www.lfd.uci.edu/~gohlke/pythonlibs/ Some advertise CUDA linkage. It might solve your problem.

@pythonBerg
Copy link

Has there been a resolution to this? Right now using linux through VM so I do not have access to GPU. Windows solution would be extremely welcome...

@ericstarr
Copy link

I'm also having trouble getting GPU working on Windows. I'm not sure what issue you are having, but in my case, it's the fact that thinc.neural.gpu_ops isn't getting created.

I should note that I'm trying to do this using CUDA v9, so some of the issue may be due to that. Also, I just started digging into this today, so I may be way off.

I think the issue is in the locate_cuda function in setup.py. I think there are two separate issue with the function.

First, the following snippet fails to see nvcc, even though it's there.

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

I think this is because
os.path.exists('[CUDA_HOME]\bin\nvcc) returns False,
but
os.path.exists('[CUDA_HOME]\bin\nvcc.exe) returns True.

I'm guessing this is a platform dependent issue.

Also, the code is looking for a lib64 directory under the CUDA_HOME directory. In my case, this doesn't exist, though there is a lib directory with an x64 directory under that. I assume that is the directory it should be pointing to. I'm not sure whether this is a platform specfic issue or an issue due to the fact that I'm using CUDA v9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants