From 1663aa179f2902cc4f96c0e3bcf2c5a152883cbd Mon Sep 17 00:00:00 2001 From: Nicholas Cilfone Date: Tue, 20 Oct 2020 16:47:10 -0400 Subject: [PATCH 1/3] Fixed CUDA Signed-off-by: Nicholas Cilfone --- pytorch_binding/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_binding/setup.py b/pytorch_binding/setup.py index ad960ea..4506029 100644 --- a/pytorch_binding/setup.py +++ b/pytorch_binding/setup.py @@ -35,7 +35,7 @@ "Build warp-rnnt and set WARP_RNNT_PATH to the location of" " libwarprnnt.so (default is '../build')").format(warp_rnnt_path)) sys.exit(1) -include_dirs = [os.path.realpath('../include')] +include_dirs = [os.path.realpath('../include'), '/usr/local/cuda/include/'] setup( name='warprnnt_pytorch', From 4e7665ca47c8ee43b137bd0e7c8d13f00f89f967 Mon Sep 17 00:00:00 2001 From: Nicholas Cilfone Date: Wed, 28 Oct 2020 17:26:40 -0400 Subject: [PATCH 2/3] gitignore for build dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build From 3691b3fa5483e911645738a7894c48fe1f116c9b Mon Sep 17 00:00:00 2001 From: Nicholas Cilfone Date: Wed, 28 Oct 2020 17:30:45 -0400 Subject: [PATCH 3/3] changes for CUDA 11 support --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c570e0..a819ee0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,11 +44,14 @@ if (WITH_OMP) set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Xcompiler -fopenmp") endif() +# Remove deprecated compute archs only if not CUDA 11.0 +IF(NOT (CUDA_VERSION GREATER 10.2)) # need to be at least 30 or __shfl_down in reduce wont compile -set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 -O2") -set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_35,code=sm_35") + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 -O2") + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_35,code=sm_35") + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50") +ENDIF() -set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50") set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_52,code=sm_52") IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5) SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES")