op/avx: check for _mm512_mullo_epi64() AVX512 intrinsic
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>
Этот коммит содержится в:
родитель
1f3e33441c
Коммит
26e42f9a0c
@ -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$
|
||||
#
|
||||
@ -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)])
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user