Skip to content

Commit e082061

Browse files
wckzhanga-szegel
andcommitted
opal/accelerator: Initial accelerator framework implementation
Add new accelerator framework. The component selection logic makes the assumption that there will only be 1 valid accelerator per instance. It will return the NULL/no-op Component if no components can be found, to allow fast execution path to not perform extra checks. It will also fail initialization if multiple accelerators are successfully initialized Added NULL Component to the Accelerator framework which does no-ops. This will allow Accelerator selection logic to always succeed and get rid of extra if checks on the critical execution path (because Accelerator will always exist). Signed-off-by: William Zhang <wilzhang@amazon.com> Co-authored-by: William Zhang <wilzhang@amazon.com> Co-authored-by: Seth Zegelstein <szegel@amazon.com> Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent 98f3af0 commit e082061

13 files changed

+1115
-0
lines changed

opal/mca/accelerator/Makefile.am

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Copyright (c) 2014 Intel, Inc. All rights reserved.
3+
# Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
4+
# All Rights reserved.
5+
# $COPYRIGHT$
6+
#
7+
# Additional copyrights may follow
8+
#
9+
# $HEADER$
10+
#
11+
12+
# main library setup
13+
noinst_LTLIBRARIES = libmca_accelerator.la
14+
libmca_accelerator_la_SOURCES =
15+
16+
# local files
17+
headers = accelerator.h
18+
libmca_accelerator_la_SOURCES += $(headers)
19+
20+
# Conditionally install the header files
21+
if WANT_INSTALL_HEADERS
22+
opaldir = $(opalincludedir)/$(subdir)
23+
nobase_opal_HEADERS = $(headers)
24+
endif
25+
26+
include base/Makefile.am
27+
28+
distclean-local:
29+
rm -f base/static-components.h

0 commit comments

Comments
 (0)