lang2logic icon indicating copy to clipboard operation
lang2logic copied to clipboard

Compatibility with newer versions of cuda

Open jorpilo opened this issue 6 years ago • 2 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 avatar Nov 25 '18 13:11 jorpilo

@jorpilo

Thanks for the solution!

donglixp avatar Nov 25 '18 13:11 donglixp

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

jorpilo avatar Nov 25 '18 13:11 jorpilo