Skip to content

Commit 3564f1a

Browse files
committed
opal: disable the __atomic built-in atomics by default on AArch64
Benchmarks are showing better performance when not using the __atomic built-ins on this arch. This PR disables them by default for this architecture only. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 4421fce commit 3564f1a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

config/opal_config_asm.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dnl Copyright (c) 2014-2017 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
1919
dnl reserved.
20+
dnl Copyright (c) 2021 Google, LLC. All rights reserved.
2021
dnl $COPYRIGHT$
2122
dnl
2223
dnl Additional copyrights may follow
@@ -1022,7 +1023,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10221023
10231024
AC_ARG_ENABLE([builtin-atomics],
10241025
[AC_HELP_STRING([--enable-builtin-atomics],
1025-
[Enable use of __sync builtin atomics (default: enabled)])])
1026+
[Enable use of __atomic builtin atomics (default: enabled)])])
10261027
10271028
opal_cv_asm_builtin="BUILTIN_NO"
10281029
AS_IF([test "$opal_cv_asm_builtin" = "BUILTIN_NO" && test "$enable_builtin_atomics" != "no"],
@@ -1075,6 +1076,12 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
10751076
OPAL_ASM_ARM_VERSION=8
10761077
AC_DEFINE_UNQUOTED([OPAL_ASM_ARM_VERSION], [$OPAL_ASM_ARM_VERSION],
10771078
[What ARM assembly version to use])
1079+
# If built-in atomics were not specifically request then disable the
1080+
# use of built-in atomics. The performance of Open MPI when using the
1081+
# built-ins.
1082+
if test "$enable_builtin_atomics" != "yes" ; then
1083+
opal_cv_asm_builtin="BUILTIN_NO"
1084+
fi
10781085
OPAL_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)'
10791086
;;
10801087

0 commit comments

Comments
 (0)