Skip to content

opal/accelerator: Remove function table and dlopen logic #10857

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

Merged
merged 3 commits into from
Sep 28, 2022
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
51 changes: 28 additions & 23 deletions config/opal_check_cuda.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ dnl
dnl $HEADER$
dnl


# OPAL_CHECK_CUDA(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
# check if CUDA support can be found. sets prefix_{CPPFLAGS,
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found

#
# Check for CUDA support
#
AC_DEFUN([OPAL_CHECK_CUDA],[
OPAL_VAR_SCOPE_PUSH([cuda_save_CPPFLAGS cuda_save_LDFLAGS cuda_save_LIBS])

cuda_save_CPPFLAGS="$CPPFLAGS"
cuda_save_LDFLAGS="$LDFLAGS"
cuda_save_LIBS="$LIBS"
#
# Check to see if user wants CUDA support
#
Expand Down Expand Up @@ -72,12 +87,15 @@ AS_IF([test "$with_cuda" = "no" || test "x$with_cuda" = "x"],
opal_cuda_incdir="$with_cuda/include"
AC_MSG_RESULT([found ($opal_cuda_incdir/cuda.h)])])])])])

dnl We cannot have CUDA support without dlopen support. HOWEVER, at
dnl this point in configure, we can't know whether the DL framework
dnl has been configured or not yet (it likely hasn't, since CUDA is a
dnl common framework, and likely configured first). So we have to
dnl defer this check until later (see the OPAL_CHECK_CUDA_AFTER_OPAL_DL m4
dnl macro, below). :-(
AS_IF([test "$opal_check_cuda_happy" = "yes"],
[OAC_CHECK_PACKAGE([cuda],
[$1],
[cuda.h],
[cuda],
[cuMemFree],
[opal_check_cuda_happy="yes"],
[opal_check_cuda_happy="no"])],
[])

# We require CUDA IPC support which started in CUDA 4.1. Error
# out if the support is not there.
Expand Down Expand Up @@ -144,22 +162,9 @@ AM_CONDITIONAL([OPAL_cuda_gdr_support], [test "x$CUDA_VERSION_60_OR_GREATER" = "
AC_DEFINE_UNQUOTED([OPAL_CUDA_GDR_SUPPORT],$CUDA_VERSION_60_OR_GREATER,
[Whether we have CUDA GDR support available])

CPPFLAGS=${cuda_save_CPPFLAGS}
LDFLAGS=${cuda_save_LDFLAGS}
LIBS=${cuda_save_LIBS}
OPAL_VAR_SCOPE_POP
])

dnl
dnl CUDA support requires DL support (it dynamically opens the CUDA
dnl library at run time). But we do not check for OPAL DL support
dnl until lafter the initial OPAL_CHECK_CUDA is called. So put the
dnl CUDA+DL check in a separate macro that can be called after the DL MCA
dnl framework checks in the top-level configure.ac.
dnl
AC_DEFUN([OPAL_CHECK_CUDA_AFTER_OPAL_DL],[

# We cannot have CUDA support without OPAL DL support. Error out
# if the user wants CUDA but we do not have OPAL DL support.
AS_IF([test $OPAL_HAVE_DL_SUPPORT -eq 0 && \
test "$opal_check_cuda_happy" = "yes"],
[AC_MSG_WARN([--with-cuda was specified, but dlopen support is disabled.])
AC_MSG_WARN([You must reconfigure Open MPI with dlopen ("dl") support.])
AC_MSG_ERROR([Cannot continue.])])
])
1 change: 0 additions & 1 deletion config/opal_config_files.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
AC_DEFUN([OPAL_CONFIG_FILES],[
AC_CONFIG_FILES([
opal/Makefile
opal/cuda/Makefile
opal/etc/Makefile
opal/include/Makefile
opal/datatype/Makefile
Expand Down
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,6 @@ AC_CACHE_SAVE

opal_show_title "System-specific tests"

OPAL_CHECK_CUDA
##################################
OPAL_CHECK_OS_FLAVORS

Expand Down Expand Up @@ -1233,8 +1232,6 @@ AC_CACHE_SAVE
# be done better by having some kind of "run this check at the end of
# all other MCA checks" hook...?

OPAL_CHECK_CUDA_AFTER_OPAL_DL

OPAL_CHECK_ROCM_AFTER_OPAL_DL

##################################
Expand Down
10 changes: 0 additions & 10 deletions opal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,18 @@
# $HEADER$
#

if OPAL_cuda_support
LIBOPAL_GPU_SUBDIR = cuda
LIBOPAL_GPU_LA = cuda/libopalcuda.la
endif


SUBDIRS = \
include \
datatype \
etc \
util \
mca/base \
$(LIBOPAL_GPU_SUBDIR) \
$(MCA_opal_FRAMEWORKS_SUBDIRS) \
$(MCA_opal_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \
. \
$(MCA_opal_FRAMEWORK_COMPONENT_DSO_SUBDIRS)
DIST_SUBDIRS = \
include \
cuda \
datatype \
etc \
util \
Expand All @@ -67,13 +59,11 @@ lib@OPAL_LIB_NAME@_la_LIBADD = \
libopen-pal_core.la \
datatype/libdatatype.la \
util/libopalutil.la \
$(LIBOPAL_GPU_LA) \
$(MCA_opal_FRAMEWORK_LIBS)
lib@OPAL_LIB_NAME@_la_DEPENDENCIES = \
libopen-pal_core.la \
datatype/libdatatype.la \
util/libopalutil.la \
$(LIBOPAL_GPU_LA) \
$(MCA_opal_FRAMEWORK_LIBS)
lib@OPAL_LIB_NAME@_la_LDFLAGS = -version-info @libopen_pal_so_version@

Expand Down
44 changes: 0 additions & 44 deletions opal/cuda/Makefile.am

This file was deleted.

47 changes: 0 additions & 47 deletions opal/cuda/README.md

This file was deleted.

Loading