Skip to content

Build cuda without cuda? #12

@AntoinePrv

Description

@AntoinePrv

Hello,

I have build my project, and resolve its dependencies when building a Singularity image (think Docker without sudo rights for executing).
I need sudo rights to build the image, so I do it on my machine, without GPU, and run the image on a cluster with GPU (there is a special flag to expose the GPU driver).

When I build my image, I take the PyTorch version with GPU, even though I don't have any when I do the install. This does not give me any problem and I can run GPU code when I deploy.

Now, resolving pytorch_scatter (et. al.), this resolves to False and the Cuda extension is not built. I get at run-time:

/usr/lib/python3.7/site-packages/torch_scatter/utils/ext.py:5: in <module>
    import scatter_cuda
E   ModuleNotFoundError: No module named 'scatter_cuda'

Is it possible to change the test torch.cuda.is_available() in setup.py to something less strong, i.e. ensuring that the extension can be built but not that there is a full Cuda run-time?
I'm not even sure that's possible...

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions