[caffe-contrib] 02/03: patch: cherry-pick Add-Pascal-to-all-cuda-architectures

Zhou Mo cdluminate-guest at moszumanska.debian.org
Fri Dec 9 02:21:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

cdluminate-guest pushed a commit to branch master
in repository caffe-contrib.

commit f70a8006ec3ca7c3406e7678832e297a080f0e16
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Fri Dec 9 02:16:48 2016 +0000

    patch: cherry-pick Add-Pascal-to-all-cuda-architectures
---
 debian/changelog                                   |  2 +
 ...0001-Add-Pascal-to-all-cuda-architectures.patch | 44 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 47 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f9de8d3..dc82a16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ caffe-contrib (1.0.0~rc3+20161127-g24d2f67-3) UNRELEASED; urgency=medium
 
   * Avoid autopkgtest failure by fixing stderr redirection.
   * Remove deprecated autopkgtest scripts.
+  * Cherry-pick upstream commit 8cd5c3df98734f4c43e1b7f43c05401fda0a94ac:
+    "Add Pascal to all cuda architectures", to better support Pascal cards.
 
  -- Zhou Mo <cdluminate at gmail.com>  Fri, 09 Dec 2016 02:10:10 +0000
 
diff --git a/debian/patches/0001-Add-Pascal-to-all-cuda-architectures.patch b/debian/patches/0001-Add-Pascal-to-all-cuda-architectures.patch
new file mode 100644
index 0000000..1b34ccc
--- /dev/null
+++ b/debian/patches/0001-Add-Pascal-to-all-cuda-architectures.patch
@@ -0,0 +1,44 @@
+From 8cd5c3df98734f4c43e1b7f43c05401fda0a94ac Mon Sep 17 00:00:00 2001
+From: Max Ehrlich <max.ehr at gmail.com>
+Date: Fri, 2 Dec 2016 10:13:50 -0500
+Subject: [PATCH] Add Pascal to all cuda architectures
+
+The known gpu architectures were missing the Pascal sm_60 and sm_61 compute capabilities. When building for this GPU, but on a separate machine, like a CI server or inside a docker image, caffe would be built for at most capability sm_50 and crash when run on the Pascal GPU.
+---
+ cmake/Cuda.cmake | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake
+index eeeb732..7146a24 100644
+--- a/cmake/Cuda.cmake
++++ b/cmake/Cuda.cmake
+@@ -4,7 +4,7 @@ endif()
+ 
+ # Known NVIDIA GPU achitectures Caffe can be compiled for.
+ # This list will be used for CUDA_ARCH_NAME = All option
+-set(Caffe_known_gpu_archs "20 21(20) 30 35 50")
++set(Caffe_known_gpu_archs "20 21(20) 30 35 50 60 61")
+ 
+ ################################################################################################
+ # A function for automatic detection of GPUs installed  (if autodetection is enabled)
+@@ -56,7 +56,7 @@ endfunction()
+ #   caffe_select_nvcc_arch_flags(out_variable)
+ function(caffe_select_nvcc_arch_flags out_variable)
+   # List of arch names
+-  set(__archs_names "Fermi" "Kepler" "Maxwell" "All" "Manual")
++  set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "All" "Manual")
+   set(__archs_name_default "All")
+   if(NOT CMAKE_CROSSCOMPILING)
+     list(APPEND __archs_names "Auto")
+@@ -89,6 +89,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
+     set(__cuda_arch_bin "30 35")
+   elseif(${CUDA_ARCH_NAME} STREQUAL "Maxwell")
+     set(__cuda_arch_bin "50")
++  elseif(${CUDA_ARCH_NAME} STREQUAL "Pascal")
++    set(__cuda_arch_bin "60 61")
+   elseif(${CUDA_ARCH_NAME} STREQUAL "All")
+     set(__cuda_arch_bin ${Caffe_known_gpu_archs})
+   elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")
+-- 
+2.10.2
+
diff --git a/debian/patches/series b/debian/patches/series
index a1ab709..9487535 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ cmake-fix-python-module-installdir
 cmake-avoid-argument-missing
 fix-more-float-comparison-precision-issue
 fix-more-float-comparison-precision-issue2
+0001-Add-Pascal-to-all-cuda-architectures.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe-contrib.git



More information about the debian-science-commits mailing list