You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/04/10 19:16:47 UTC

[incubator-mxnet] branch master updated: Refreshed branch issue_187 (#10375)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new c7e8047  Refreshed branch issue_187 (#10375)
c7e8047 is described below

commit c7e8047d0f8926ff0f746801b935db43cc9fece0
Author: Chris Olivier <cj...@gmail.com>
AuthorDate: Tue Apr 10 12:16:43 2018 -0700

    Refreshed branch issue_187 (#10375)
---
 src/common/cuda_utils.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/common/cuda_utils.h b/src/common/cuda_utils.h
index 9d3388b..962fe5a 100644
--- a/src/common/cuda_utils.h
+++ b/src/common/cuda_utils.h
@@ -53,6 +53,21 @@ extern __cuda_fake_struct blockIdx;
 #include <cublas_v2.h>
 #include <curand.h>
 
+/*!
+ * \brief When compiling a __device__ function, check that the architecture is >= Kepler (3.0)
+ *        Note that __CUDA_ARCH__ is not defined outside of a __device__ function
+ */
+#ifdef __CUDACC__
+inline __device__ bool __is_supported_cuda_architecture() {
+#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 300
+#error "Fermi and earlier GPU architectures are not supported (architecture versions less than 3.0)"
+  return false;
+#else
+  return true;
+#endif  // __CUDA_ARCH__ < 300
+}
+#endif  // __CUDACC__
+
 namespace mxnet {
 namespace common {
 /*! \brief common utils for cuda */

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.