pytorch_sparse
pytorch_sparse copied to clipboard
No compiled with CUDA support on Power PC architecture
Hi, thanks very much for developing this useful library! I have no issue running the sparse multiplication on CPU. However, when I tried to run it on the CUDA, it has the error that No Compiled with CUDA support:
File /nobackup/users/junhong/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch_sparse/storage.py:195, in SparseStorage.rowptr(self)
193 row = self._row
194 if row is not None:
--> 195 rowptr = torch.ops.torch_sparse.ind2ptr(row, self._sparse_sizes[0])
196 self._rowptr = rowptr
197 return rowptr
RuntimeError: Not compiled with CUDA support
Currently, I am running job on a shared supercomputer with IBM Power PC 9 architecture (ppc64le). The Python version I am using is 3.9, Pytorch version 1.10.2, CUDA version 11.2, torch_geometric version 2.1.0, torch_sparse version 0.6.13. I have tried the command suggested in the other issue thread, but still have no luck:
pip install torch-sparse==0.6.13 -f https://data.pyg.org/whl/torch-1.10.2+cu111.html --no-cache-dir
I suspect it's because ppc64le architecture is not compiled and support using the existing wheel. I am wondering is there a way to build the torch sparse library from source? I tried to follow the README, but as I am in a shared supercomputer, there is no CUDA folder underneath /usr/local path.
Thanks in advanced!
If there does not exist a wheel for your specific platform, pip install torch-sparse will automatically try to compile from source. I suggest to run it via
FORCE_CUDA=1 pip install --verbose torch-sparse
and post the installation log here if there exists any issues.
Hi rusty1s,
Thanks for your reply! I eventually solve it. I firstly tried your command and it gave me the error for missing the CUDA_HOME environment. As said before, I don't have the CUDA folder underneath /usr/local path since I am on a shared supercomputer. I did some further investigation and found there is CUDA compilation file in my conda environment. So setting CUDA_HOME=$CONDA_PREFIX would be enough. Also make sure you have installed cudatoolkit-dev properly, so that the CUDA include/lib files are complete and also nvcc is available under the bin folder.
Lastly, by running this command, it successfully compile the torch-sparse library without error. I use --no-cache-dir to make sure it doesn't cut the short path and just install the previously built wrong wheel file.
FORCE_CUDA=1 CUDA_HOME=$CONDA_PREFIX pip install --verbose torch-sparse --no-cache-dir
This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?