pytorch_sparse: undefined symbol: cusparseScsrgemm

Hi,

I’m trying to get the torch-geometry package to work and everything installs just fine.

But I’m getting following error during import from torch_sparse:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/philipp/.local/share/virtualenvs/pytorch_geometric-4vUoAfdD/lib/python3.6/site-packages/torch_sparse/__init__.py", line 4, in <module>
    from .spspmm import spspmm
  File "/home/philipp/.local/share/virtualenvs/pytorch_geometric-4vUoAfdD/lib/python3.6/site-packages/torch_sparse/spspmm.py", line 7, in <module>
    import spspmm_cuda
ImportError: /home/philipp/.local/share/virtualenvs/pytorch_geometric-4vUoAfdD/lib/python3.6/site-packages/spspmm_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cusparseScsrgemm

For me that can be reproduced with:

#!/bin/bash
pipenv --python 3.6
export PATH=/opt/cuda/bin:$PATH
export CPATH=/opt/cuda/include
pipenv install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp36-cp36m-linux_x86_64.whl
pipenv install torchvision
pipenv install cffi
pipenv install torch-scatter
pipenv install torch-sparse
# pipenv install torch-cluster
# pipenv install torch-spline-conv
# pipenv install torch-geometric
pipenv run python -c "from torch_sparse import spmm"

More info:

$ pipenv run python -c "import torch; print(torch.__version__)"
0.4.1

I’m not sure if this is a problem on my side or not. Would appreciate your help.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 34 (24 by maintainers)

Commits related to this issue

Most upvoted comments

Updated torch-sparse to 0.2.1 on pypi with the proposed fixes. Thanks to all.