Skip to content

Commit

Permalink
op/avx: check for _mm512_mullo_epi64() AVX512 intrinsic
Browse files Browse the repository at this point in the history
PGI (20.4) compiler do not define this intrinsic, so only build
AVX512 support if _mm512_mullo_epi64() intrisic is defined.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
  • Loading branch information
ggouaillardet committed Nov 4, 2020
1 parent 1f3e334 commit 26e42f9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ompi/mca/op/avx/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2020 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
#
# $COPYRIGHT$
#
Expand Down Expand Up @@ -83,6 +85,25 @@ AC_DEFUN([MCA_ompi_op_avx_CONFIG],[
CFLAGS="$op_avx_cflags_save"
])
#
# Some PGI compilers do not define _mm512_mullo_epi64. Screen them out.
#
AS_IF([test $op_avx512_support -eq 1],
[AC_MSG_CHECKING([if _mm512_mullo_epi64 generates code that can be compiled])
op_avx_cflags_save="$CFLAGS"
CFLAGS="$CFLAGS_WITHOUT_OPTFLAGS -O0 $MCA_BUILD_OP_AVX512_FLAGS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <immintrin.h>]],
[[
__m512i vA, vB;
_mm512_mullo_epi64(vA, vB)
]])],
[AC_MSG_RESULT([yes])],
[op_avx512_support=0
MCA_BUILD_OP_AVX512_FLAGS=""
AC_MSG_RESULT([no])])
CFLAGS="$op_avx_cflags_save"
])
#
# Check support for AVX2
#
AC_MSG_CHECKING([for AVX2 support (no additional flags)])
Expand Down

0 comments on commit 26e42f9

Please sign in to comment.