diff --git a/config/opal_check_cuda.m4 b/config/opal_check_cuda.m4 index 40c1281e27..3666c32db4 100644 --- a/config/opal_check_cuda.m4 +++ b/config/opal_check_cuda.m4 @@ -76,6 +76,14 @@ AS_IF([test "$opal_check_cuda_happy"="yes"], [#include <$opal_cuda_incdir/cuda.h>]), []) +# If we have CUDA support, check to see if we have CUDA 6.0 support. +# Look for new CUDA 6.0 attribute. +AS_IF([test "$opal_check_cuda_happy"="yes"], + AC_CHECK_HEADER([$opal_cuda_incdir/cuda.h]) + AC_CHECK_DECL([CU_POINTER_ATTRIBUTE_BUFFER_ID], [CUDA_SUPPORT_60=1], [CUDA_SUPPORT_60=0], + [#include <$opal_cuda_incdir/cuda.h>]), + []) + AC_MSG_CHECKING([if have cuda support]) if test "$opal_check_cuda_happy" = "yes"; then AC_MSG_RESULT([yes (-I$with_cuda)]) @@ -95,4 +103,8 @@ AM_CONDITIONAL([OPAL_cuda_support_41], [test "x$CUDA_SUPPORT_41" = "x1"]) AC_DEFINE_UNQUOTED([OPAL_CUDA_SUPPORT_41],$CUDA_SUPPORT_41, [Whether we have CUDA 4.1 support available]) +AM_CONDITIONAL([OPAL_cuda_support_60], [test "x$CUDA_SUPPORT_60" = "x1"]) +AC_DEFINE_UNQUOTED([OPAL_CUDA_SUPPORT_60],$CUDA_SUPPORT_60, + [Whether we have CUDA 6.0 support available]) + ]) diff --git a/ompi/mca/common/cuda/configure.m4 b/ompi/mca/common/cuda/configure.m4 index 675d300f2c..49ad8f9f82 100644 --- a/ompi/mca/common/cuda/configure.m4 +++ b/ompi/mca/common/cuda/configure.m4 @@ -32,7 +32,12 @@ AC_DEFUN([MCA_ompi_common_cuda_CONFIG],[ AM_CONDITIONAL([MCA_ompi_cuda_support_41], [test "x$CUDA_SUPPORT_41" = "x1"]) AC_DEFINE_UNQUOTED([OMPI_CUDA_SUPPORT_41],$CUDA_SUPPORT_41, [Whether we want support CUDA 4.1 features]) - + + # Check to see if we have features of CUDA 6.0 available as well. + AM_CONDITIONAL([MCA_ompi_cuda_support_60], [test "x$CUDA_SUPPORT_60" = "x1"]) + AC_DEFINE_UNQUOTED([OMPI_CUDA_SUPPORT_60],$CUDA_SUPPORT_60, + [Whether we want support CUDA 6.0 features]) + # Copy over the includes needed to build CUDA common_cuda_CPPFLAGS=$opal_datatype_cuda_CPPFLAGS AC_SUBST([common_cuda_CPPFLAGS])