Pytorch_geometric: Windows installation error: torch sparse -> spspmm_kernel.cu

Created on 27 Mar 2019  路  4Comments  路  Source: rusty1s/pytorch_geometric

馃悰 Bug

Windows installation error: torch sparse -> spspmm_kernel.cu

To Reproduce

Steps to reproduce the behavior:

  1. Install torch, CUDA, etc
  2. pip install torch-sparse
    C:/Users/ditho/AppData/Local/conda/conda/envs/pytorch_geometric/lib/site-packages/torch/lib/include\c10/util/ArrayRef.h(143): error: variable in constexpr function d
oes not have automatic storage duration
              detected during instantiation of "const T &c10::ArrayRef<T>::front() const [with T=at::Tensor]"
    C:/Users/ditho/AppData/Local/conda/conda/envs/pytorch_geometric/lib/site-packages/torch/lib/include\ATen/DeviceGuard.h(30): here

    C:/Users/ditho/AppData/Local/conda/conda/envs/pytorch_geometric/lib/site-packages/torch/lib/include\ATen/TensorGeometry.h(56): warning: field of class type without a
 DLL interface used in a class with a DLL interface

    C:/Users/ditho/AppData/Local/conda/conda/envs/pytorch_geometric/lib/site-packages/torch/lib/include\ATen/TensorGeometry.h(57): warning: field of class type without a
 DLL interface used in a class with a DLL interface

    1 error detected in the compilation of "C:/Users/ditho/AppData/Local/Temp/tmpxft_000056f8_00000000-10_spspmm_kernel.cpp1.ii".
    spspmm_kernel.cu
    error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\nvcc.exe' failed with exit status 1

    ----------------------------------------
Command "C:\Users\ditho\AppData\Local\conda\conda\envs\pytorch_geometric\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ditho\\AppData\\Local\\Temp\\
pip-install-3h72pytv\\torch-sparse\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe
c'))" install --record C:\Users\ditho\AppData\Local\Temp\pip-record-knhcqgov\install-record.txt --single-version-externally-managed --compile" failed with error code 1 i
n C:\Users\ditho\AppData\Local\Temp\pip-install-3h72pytv\torch-sparse\

Expected behavior

torch-sparse would install properly

Environment

  • OS: Windows 10
  • Python version: Python 3.6
  • PyTorch version: 1.0.1
  • CUDA/cuDNN version:
$ python -c "import torch; print(torch.version.cuda)"
>>> 10.0

$ nvcc --version
>>> Cuda compilation tools, release 10.1, V10.1.105
  • GCC version:
  • Using conda

Most helpful comment

That fixed it... Quite the annoying issue. There was some incompatibility with 9.2 and visual studio. If anyone comes here with windows issues for now I recommend:

  1. Double check your GPU driver is installed properly (for me I had issues in device manager and had to install the proper drivers again)
  2. Uninstall all CUDA versions and install CUDA 10.0 (not 10.1 because cudatoolkit in the next step has to match)
  3. Install pytorch like instructed (here)[https://pytorch.org/], I used conda
  4. Follow the instructions from this repo's README

All 4 comments

I've never seen this error before, and I am wondering if this is caused by torch.version.cuda=10.0 and nvcc --version=10.1. Do you have multiple CUDA versions?

I installed pytorch like the website said:
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

It seems cudatoolkit 10.1 doesnt exist, so I could uninstall CUDA 10.1 and install CUDA 10.0?

It would be great if you could try this out.

That fixed it... Quite the annoying issue. There was some incompatibility with 9.2 and visual studio. If anyone comes here with windows issues for now I recommend:

  1. Double check your GPU driver is installed properly (for me I had issues in device manager and had to install the proper drivers again)
  2. Uninstall all CUDA versions and install CUDA 10.0 (not 10.1 because cudatoolkit in the next step has to match)
  3. Install pytorch like instructed (here)[https://pytorch.org/], I used conda
  4. Follow the instructions from this repo's README
Was this page helpful?
0 / 5 - 0 ratings

Related issues

JsBlueCat picture JsBlueCat  路  3Comments

FerranAlet picture FerranAlet  路  4Comments

a060146251 picture a060146251  路  3Comments

WMF1997 picture WMF1997  路  4Comments

yuanx749 picture yuanx749  路  4Comments