Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
c2f7718b
Commit
c2f7718b
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Only set the AVX512 flags with GCC when compiling with a version that supports the flag.
parent
c872e9dd
No related branches found
No related tags found
1 merge request
!946
Special flags for gravity
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+19
-8
19 additions, 8 deletions
configure.ac
with
19 additions
and
8 deletions
configure.ac
+
19
−
8
View file @
c2f7718b
...
...
@@ -71,6 +71,13 @@ AC_USE_SYSTEM_EXTENSIONS
AX_COMPILER_VENDOR
AX_COMPILER_VERSION
# Check whether we have a recent enough GCC
if test "$ax_cv_c_compiler_vendor" = "gnu"; then
AX_COMPARE_VERSION([$ax_cv_c_compiler_version], [ge], [8.1.0],
[gcc_handles_avx512="yes"],
[gcc_handles_avx512="no"])
fi
# Restrict support.
AC_C_RESTRICT
...
...
@@ -462,14 +469,18 @@ if test "$enable_opt" = "yes" ; then
;;
esac
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
case "$ax_gcc_arch" in
*skylake-avx512*)
GRAVITY_CFLAGS="$GRAVITY_CFLAGS -mprefer-vector-width=512"
;;
*)
AC_MSG_WARN([No additional flags needed for gravity on this platform])
;;
esac
if test "$gcc_handles_avx512" = "yes"; then
case "$ax_gcc_arch" in
*skylake-avx512*)
[GRAVITY_CFLAGS="$GRAVITY_CFLAGS -mprefer-vector-width=512"],
;;
*)
AC_MSG_WARN([No additional flags needed for gravity on this platform])
;;
esac
else
AC_MSG_WARN([No additional flags needed for gravity on this platform])
fi
else
AC_MSG_WARN([Do not know what best gravity vectorization flags to choose for this compiler])
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment