piiswrong closed pull request #10375: [MXNET-187] Disallow Pre-Kepler (i.e. 
Fermi) architectures
URL: https://github.com/apache/incubator-mxnet/pull/10375

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/src/common/cuda_utils.h b/src/common/cuda_utils.h
index 9d3388b2351..962fe5a5764 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__ 
+ */
+#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;
+  return true;
+#endif  // __CUDA_ARCH__ < 300
+#endif  // __CUDACC__
 namespace mxnet {
 namespace common {
 /*! \brief common utils for cuda */


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:

With regards,
Apache Git Services

Reply via email to