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

Support building with GPU support even when CUDA is not currently available #68

Open
vnavkal opened this issue Jun 18, 2020 · 2 comments

Comments

@vnavkal
Copy link

vnavkal commented Jun 18, 2020

Currently we use this conditional to determine whether to build with GPU support:

DCNv2/setup.py

Line 33 in c7f778f

if torch.cuda.is_available() and CUDA_HOME is not None:

But it would be nice to be able to build the library with GPU support even in environments where CUDA is not available. In particular, I'd like to be able to do this while building a docker image.

If this sounds like a reasonable change, I'm happy to submit a PR for it. I think it would look quite similar to pytorch/vision#927.

@zhaotf16
Copy link

zhaotf16 commented Apr 6, 2021

Hi, I met the same problem. Did you solve it? It would be better to be able to build on a login-node without GPU and to run on a gpu-node

@vnavkal
Copy link
Author

vnavkal commented Apr 7, 2021

@zhaotf16 I solved it by modifying the conditional to allow being overridden by a FORCE_CUDA environment variable, as in the torchvision commit I linked to. (I did this only in my copy of the repo and didn't submit a PR for that change.)

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

No branches or pull requests

2 participants