Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for 1.9.x-aws #385

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ AC_FUNC_MALLOC
AC_CHECK_FUNC([memset], [], [AC_MSG_ERROR([NCCL OFI Plugin requires memset function.])])
AC_CHECK_FUNC([realpath], [], [AC_MSG_ERROR([NCCL OFI Plugin requires realpath function.])])
AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([NCCL OFI Plugin requires dlopen])])
AC_SEARCH_LIBS([pthread_getspecific], [pthread], [], [AC_MSG_ERROR([NCCL OFI Plugin requires pthreads.])])
AC_SEARCH_LIBS([log2], [m], [], [AC_MSG_ERROR([NCCL OFI Plugin requires the log2 library function.])])

# Check for GCC builtin functions
CHECK_GCC_BUILTIN([__builtin_expect])
Expand Down
10 changes: 9 additions & 1 deletion m4/check_pkg_cuda.m4
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ AC_DEFUN([CHECK_PKG_CUDA], [
AS_IF([test "${check_pkg_found}" = "yes"],
[AC_CHECK_HEADERS([cuda.h], [], [check_pkg_found=no])])

AS_IF([test "${check_pkg_found}" = "yes"],
dnl We only need to include libcuda.so for the functional tests, as
dnl the plugins themselves dynamicly load libcuda at runtime. This
dnl is a problem when building in a container on a non-GPU instance,
dnl as frequently libcuda is pulled from the base AMI when using
dnl containers and not there on non-GPU instances, and this check
dnl would break the build in that situation. Since unit tests don't
dnl have to be built, only check for libcuda.so if we're building
dnl the unit tests.
AS_IF([test "${check_pkg_found}" = "yes" -a "${enable_tests}" != "no"],
[AC_SEARCH_LIBS([cuMemHostAlloc], [cuda], [CUDA_LIBS="-lcuda"], [check_pkg_found=no])])

AS_IF([test "${check_pkg_found}" = "yes"],
Expand Down
Loading