configure options: cublas; cudamallocasync

This commit is contained in:
Ruipeng Li 2022-03-07 16:40:32 -08:00
parent d7728d0bce
commit df0f6dbba7
3 changed files with 52 additions and 8 deletions

View File

@ -172,6 +172,9 @@
/* Define to 1 if using cuSPARSE */
#undef HYPRE_USING_CUSPARSE
/* Define to 1 if using device async malloc */
#undef HYPRE_USING_DEVICE_MALLOC_ASYNC
/* Define to 1 if using device memory without UM */
#undef HYPRE_USING_DEVICE_MEMORY

View File

@ -173,9 +173,10 @@ hypre_gpu_mpi=no
hypre_using_gpu_profiling=no
hypre_using_cuda_streams=no
hypre_using_cusparse=yes
hypre_using_cublas=no
hypre_using_cublas=yes
hypre_using_curand=yes
hypre_using_device_pool=no
hypre_using_device_malloc_async=no
hypre_using_umpire=no
hypre_using_umpire_host=no
hypre_using_umpire_device=no
@ -442,15 +443,26 @@ AS_HELP_STRING([--enable-device-memory-pool],
[hypre_using_device_pool=no]
)
AC_ARG_ENABLE(device-malloc-async,
AS_HELP_STRING([--enable-device-malloc-async],
[Use device async malloc (default is NO).]),
[case "${enableval}" in
yes) hypre_using_device_malloc_async=yes ;;
no) hypre_using_device_malloc_async=no ;;
*) hypre_using_device_malloc_async=no ;;
esac],
[hypre_using_device_malloc_async=no]
)
AC_ARG_ENABLE(cublas,
AS_HELP_STRING([--enable-cublas],
[Use cuBLAS (default is NO).]),
[Use cuBLAS (default is YES).]),
[case "${enableval}" in
yes) hypre_using_cublas=yes ;;
no) hypre_using_cublas=no ;;
*) hypre_using_cublas=no ;;
*) hypre_using_cublas=yes ;;
esac],
[hypre_using_cublas=no]
[hypre_using_cublas=yes]
)
AC_ARG_ENABLE(curand,
@ -2263,6 +2275,11 @@ then
AC_DEFINE(HYPRE_USING_DEVICE_POOL, 1, [Define to 1 if using device pooling allocator])
fi
if test "$hypre_using_device_malloc_async" = "yes"
then
AC_DEFINE(HYPRE_USING_DEVICE_MALLOC_ASYNC, 1, [Define to 1 if using device async malloc])
fi
if test "x$hypre_using_cuda_streams" = "xyes"
then
AC_DEFINE([HYPRE_USING_CUDA_STREAMS], 1, [Define to 1 if using streams])

32
src/configure vendored
View File

@ -785,6 +785,7 @@ enable_unified_memory
enable_cuda_streams
enable_cusparse
enable_device_memory_pool
enable_device_malloc_async
enable_cublas
enable_curand
enable_rocsparse
@ -1518,7 +1519,9 @@ Optional Features:
--enable-cusparse Use cuSPARSE (default is YES).
--enable-device-memory-pool
Use device pooling allocator (default is NO).
--enable-cublas Use cuBLAS (default is NO).
--enable-device-malloc-async
Use device async malloc (default is NO).
--enable-cublas Use cuBLAS (default is YES).
--enable-curand Use cuRAND (default is YES).
--enable-rocsparse Use rocSPARSE (default is YES).
--enable-rocblas Use rocBLAS (default is NO).
@ -2782,9 +2785,10 @@ hypre_gpu_mpi=no
hypre_using_gpu_profiling=no
hypre_using_cuda_streams=no
hypre_using_cusparse=yes
hypre_using_cublas=no
hypre_using_cublas=yes
hypre_using_curand=yes
hypre_using_device_pool=no
hypre_using_device_malloc_async=no
hypre_using_umpire=no
hypre_using_umpire_host=no
hypre_using_umpire_device=no
@ -3151,15 +3155,28 @@ else
fi
# Check whether --enable-device-malloc-async was given.
if test "${enable_device_malloc_async+set}" = set; then :
enableval=$enable_device_malloc_async; case "${enableval}" in
yes) hypre_using_device_malloc_async=yes ;;
no) hypre_using_device_malloc_async=no ;;
*) hypre_using_device_malloc_async=no ;;
esac
else
hypre_using_device_malloc_async=no
fi
# Check whether --enable-cublas was given.
if test "${enable_cublas+set}" = set; then :
enableval=$enable_cublas; case "${enableval}" in
yes) hypre_using_cublas=yes ;;
no) hypre_using_cublas=no ;;
*) hypre_using_cublas=no ;;
*) hypre_using_cublas=yes ;;
esac
else
hypre_using_cublas=no
hypre_using_cublas=yes
fi
@ -9185,6 +9202,13 @@ $as_echo "#define HYPRE_USING_DEVICE_POOL 1" >>confdefs.h
fi
if test "$hypre_using_device_malloc_async" = "yes"
then
$as_echo "#define HYPRE_USING_DEVICE_MALLOC_ASYNC 1" >>confdefs.h
fi
if test "x$hypre_using_cuda_streams" = "xyes"
then