DCNv2
DCNv2 copied to clipboard
Support building with GPU support even when CUDA is not currently available
Currently we use this conditional to determine whether to build with GPU support: https://github.com/CharlesShang/DCNv2/blob/c7f778f28b84c66d3af2bf16f19148a07051dac1/setup.py#L33
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 https://github.com/pytorch/vision/pull/927.
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
@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.)