Closed LingxiaoShawn closed 5 years ago
Thank you for your detailed installation report. This is a very strange error and may be caused by internal ATen changes in PyTorch from v1.0 to v1.1. I generally try my best to keep all packages be installable with the stable PyTorch release, but can not guarantee that everything works smoothly in current PyTorch master. I suggest you to simple skip the compilation of spspmm_kernel.cu
(it is not needed for PyG):
setup.py
in torch-sparse
and remove the line 16-18.torch-sparse/__init__.py
and remove line 6 and 20.python setup.py install
Hi Matthias it works without spspmm, thank you for help!
📚 Installation
Environment
Checklist
nvcc
.Additional context
pip install --no-cache-dir torch-sparse Collecting torch-sparse Downloading https://files.pythonhosted.org/packages/73/72/e374662f6f47d9ac0e082a6d5c18d14e15c52863e89c6bc6957a0d2ed026/torch_sparse-0.2.4.tar.gz Requirement already satisfied: scipy in ./anaconda3/envs/torch1.0/lib/python3.6/site-packages (from torch-sparse) (1.2.1) Requirement already satisfied: numpy>=1.8.2 in ./anaconda3/envs/torch1.0/lib/python3.6/site-packages (from scipy->torch-sparse) (1.16.2) Installing collected packages: torch-sparse Running setup.py install for torch-sparse ... error Complete output from command /home/lingxiao/anaconda3/envs/torch1.0/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-_oj5tmie/torch-sparse/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-kvljuamw/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/test copying test/test_coalesce.py -> build/lib.linux-x86_64-3.6/test copying test/utils.py -> build/lib.linux-x86_64-3.6/test copying test/test_transpose.py -> build/lib.linux-x86_64-3.6/test copying test/test_eye.py -> build/lib.linux-x86_64-3.6/test copying test/test_spspmm.py -> build/lib.linux-x86_64-3.6/test copying test/test_spmm.py -> build/lib.linux-x86_64-3.6/test copying test/init.py -> build/lib.linux-x86_64-3.6/test creating build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/spmm.py -> build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/transpose.py -> build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/coalesce.py -> build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/eye.py -> build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/spspmm.py -> build/lib.linux-x86_64-3.6/torch_sparse copying torch_sparse/init.py -> build/lib.linux-x86_64-3.6/torch_sparse creating build/lib.linux-x86_64-3.6/torch_sparse/utils copying torch_sparse/utils/unique.py -> build/lib.linux-x86_64-3.6/torch_sparse/utils copying torch_sparse/utils/init.py -> build/lib.linux-x86_64-3.6/torch_sparse/utils running build_ext building 'torch_sparse.spspmm_cuda' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/cuda gcc -pthread -B /home/lingxiao/anaconda3/envs/torch1.0/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/TH -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lingxiao/anaconda3/envs/torch1.0/include/python3.6m -c cuda/spspmm.cpp -o build/temp.linux-x86_64-3.6/cuda/spspmm.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=spspmm_cuda -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ /usr/local/cuda/bin/nvcc -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/TH -I/home/lingxiao/anaconda3/envs/torch1.0/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lingxiao/anaconda3/envs/torch1.0/include/python3.6m -c cuda/spspmm_kernel.cu -o build/temp.linux-x86_64-3.6/cuda/spspmm_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=spspmm_cuda -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 cuda/spspmm_kernel.cu(78): error: no suitable user-defined conversion from "at::DeprecatedTypeProperties" to "const at::Type" exists
Command "/anaconda3/envs/torch1.0/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-_oj5tmie/torch-sparse/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-kvljuamw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-_oj5tmie/torch-sparse/