donglixp / lang2logic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility with newer versions of cuda

jorpilo opened this issue · comments

If we are going to use the old torch version
https://drive.google.com/file/d/0B8yp1gOBCztycW42eDNNaExWSlU/view?usp=sharing
Somepeople may have experienced problems when compiling with newer versions of CUDA as CUDA 9 deprecates arquitecture sm_20.

In order to compile it for newer versions of cuda some adjustements must be done in the files:
torch/extra/cutorch/cmake/FindCudaArch.cmake
torch/extra/cunn/cmake/FindCudaArch.cmake
torch/extra/cunnx/cmake/FindCudaArch.cmake
torch/extra/cucmake/FindCudaArch.cmake

At the begining of the file there is the line:

SET(KNOWN_GPU_ARCHITECTURES "2.0 2.1(2.0) 3.0 3.5 5.0")

if we are going to use CUDA >= 9 we need to remove 2.0 2.1(2.0)

and we need to add our architecture, for gtx sm_61 it would be 6.1

I personally added it in the IF (CUDA_VERSION VERSION_GREATER "6.5") part

@jorpilo

Thanks for the solution!

I just created a running nvidia-dockers, I will push to a repository and comment it