CCZ23
CCZ23

Reputation: 151

CUDA version of package not importing?

Firstly, I installed torch 1.1.0, and then I installed its' dependencies. So, I can import torch_scatter 1.2.0 however I get this error when importing torch_scatter.scatter_cuda:

 import torch_scatter.scatter_cuda
ModuleNotFoundError: No module named 'torch_scatter.scatter_cuda'

I have Cuda v10 installed and I have a GPU. All of the requirements for this code were installed together through pip in one go on my virtual environment.

Upvotes: 1

Views: 2035

Answers (1)

philipjhj
philipjhj

Reputation: 427

As pointed out by phd - it looks like the setup.py file of pytorch_scatter checks for and uses an available cuda installation automatically.

Also in the version you are using as seen here:

...
if CUDA_HOME is not None:
    ext_modules += [
                   CUDAExtension('torch_scatter.scatter_cuda',
                  ['cuda/scatter.cpp', 'cuda/scatter_kernel.cu'])
    ]
...

Might be a question of whether CUDA_HOME is available.

Installing from source might give you more information as suggested here.

Upvotes: 1

Related Questions