You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/31 07:59:58 UTC

[GitHub] fran6co closed pull request #11943: Fixes not being able to target an older CUDAs when multiple versions are present

fran6co closed pull request #11943: Fixes not being able to target an older CUDAs when multiple versions are present
URL: https://github.com/apache/incubator-mxnet/pull/11943
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 483108a6841..9a2e0fefa3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,10 +55,7 @@ if(USE_CUDA AND NOT USE_OLDCMAKECUDA)
   else()
     set(FIRST_CUDA FALSE)
     set(USE_OLDCMAKECUDA TRUE)
-    project(mxnet C CXX)
   endif()
-else()
-  project(mxnet C CXX)
 endif()
 
 
@@ -207,15 +204,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
 
 if(USE_CUDA)
-  find_package(CUDA REQUIRED)
   add_definitions(-DMSHADOW_USE_CUDA=1)
-  if(FIRST_CUDA AND (NOT USE_OLDCMAKECUDA))
-    if(NOT CUDA_TOOLSET)
-      set(CUDA_TOOLSET "${CUDA_VERSION_STRING}")
-    endif()
-    set(CMAKE_GENERATOR_TOOLSET "cuda=${CUDA_TOOLSET},host=x64")
-  else()
-    set(FIRST_CUDA FALSE)
+  if(NOT FIRST_CUDA)
+    find_package(CUDA REQUIRED)
   endif()
   if(USE_NCCL)
     find_package(NCCL)
diff --git a/cmake/FirstClassLangCuda.cmake b/cmake/FirstClassLangCuda.cmake
index 4b44077d2c5..a2516c2b326 100644
--- a/cmake/FirstClassLangCuda.cmake
+++ b/cmake/FirstClassLangCuda.cmake
@@ -33,12 +33,16 @@ function(detect_cuDNN)
 
   find_path(CUDNN_INCLUDE cudnn.h
             PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT}
+            PATH_SUFFIXES include
+            NO_DEFAULTS
+            NO_SYSTEM_ENVIRONMENT_PATH
             DOC "Path to cuDNN include directory." )
 
-
   find_library(CUDNN_LIBRARY NAMES libcudnn.so cudnn.lib # libcudnn_static.a
                              PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE}
                              PATH_SUFFIXES lib lib/x64
+                             NO_DEFAULTS
+                             NO_SYSTEM_ENVIRONMENT_PATH
                              DOC "Path to cuDNN library.")
 
   if(CUDNN_INCLUDE AND CUDNN_LIBRARY)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services