From 0403f4d6dd76d9b620ed2da5421db9a42bcb983d Mon Sep 17 00:00:00 2001 From: casparvl Date: Thu, 1 Oct 2026 14:30:28 +0000 Subject: [PATCH 01/16] Check native compiler flags against per-CPU-target references before building To allow multiple (redundant) build hosts per CPU target, verify early in EESSI-install-software.sh that the compilers of all toolchains supported in the EESSI version being built translate the native architecture flag (-march=native on x86_64, -mcpu=native on aarch64, as used by EasyBuild) into exactly the same target flags as recorded in a reference for the CPU target. This asks the GCC/Clang driver directly (via -###) rather than relying on a surrogate such as lscpu. - scripts/native_flags/get_supported_toolchains.py: extract the supported toplevel toolchains for an EESSI version from eb_hooks.py - scripts/native_flags/check_native_flags.sh: check (or --generate) references in scripts/native_flags/references//-.txt - references for all non-generic CPU targets built on the AWS build cluster A missing reference is an error, unless $EESSI_NATIVE_FLAGS_ALLOW_MISSING_REFERENCE is set. The check can be skipped entirely with $EESSI_SKIP_NATIVE_FLAGS_CHECK, and is skipped for generic builds. Co-Authored-By: Claude Opus 5.5 --- EESSI-install-software.sh | 13 + scripts/native_flags/check_native_flags.sh | 230 ++++++++++++++++++ .../native_flags/get_supported_toolchains.py | 74 ++++++ .../aarch64/aws/graviton4/clang-21.1.8.txt | 37 +++ .../aarch64/aws/graviton4/gcc-15.2.0.txt | 5 + .../aarch64/neoverse_n1/clang-20.1.8.txt | 19 ++ .../aarch64/neoverse_n1/clang-21.1.8.txt | 19 ++ .../aarch64/neoverse_n1/gcc-12.2.0.txt | 3 + .../aarch64/neoverse_n1/gcc-12.3.0.txt | 3 + .../aarch64/neoverse_n1/gcc-13.2.0.txt | 3 + .../aarch64/neoverse_n1/gcc-13.3.0.txt | 3 + .../aarch64/neoverse_n1/gcc-14.2.0.txt | 3 + .../aarch64/neoverse_n1/gcc-14.3.0.txt | 3 + .../aarch64/neoverse_n1/gcc-15.2.0.txt | 5 + .../aarch64/neoverse_v1/clang-20.1.8.txt | 32 +++ .../aarch64/neoverse_v1/clang-21.1.8.txt | 32 +++ .../aarch64/neoverse_v1/gcc-12.2.0.txt | 3 + .../aarch64/neoverse_v1/gcc-12.3.0.txt | 3 + .../aarch64/neoverse_v1/gcc-13.2.0.txt | 3 + .../aarch64/neoverse_v1/gcc-13.3.0.txt | 3 + .../aarch64/neoverse_v1/gcc-14.2.0.txt | 3 + .../aarch64/neoverse_v1/gcc-14.3.0.txt | 3 + .../aarch64/neoverse_v1/gcc-15.2.0.txt | 5 + .../x86_64/amd/zen2/clang-20.1.8.txt | 118 +++++++++ .../x86_64/amd/zen2/clang-21.1.8.txt | 118 +++++++++ .../references/x86_64/amd/zen2/gcc-12.2.0.txt | 90 +++++++ .../references/x86_64/amd/zen2/gcc-12.3.0.txt | 90 +++++++ .../references/x86_64/amd/zen2/gcc-13.2.0.txt | 98 ++++++++ .../references/x86_64/amd/zen2/gcc-13.3.0.txt | 98 ++++++++ .../references/x86_64/amd/zen2/gcc-14.2.0.txt | 99 ++++++++ .../references/x86_64/amd/zen2/gcc-14.3.0.txt | 99 ++++++++ .../references/x86_64/amd/zen2/gcc-15.2.0.txt | 106 ++++++++ .../x86_64/amd/zen3/clang-20.1.8.txt | 118 +++++++++ .../x86_64/amd/zen3/clang-21.1.8.txt | 118 +++++++++ .../references/x86_64/amd/zen3/gcc-12.2.0.txt | 90 +++++++ .../references/x86_64/amd/zen3/gcc-12.3.0.txt | 90 +++++++ .../references/x86_64/amd/zen3/gcc-13.2.0.txt | 98 ++++++++ .../references/x86_64/amd/zen3/gcc-13.3.0.txt | 98 ++++++++ .../references/x86_64/amd/zen3/gcc-14.2.0.txt | 99 ++++++++ .../references/x86_64/amd/zen3/gcc-14.3.0.txt | 99 ++++++++ .../references/x86_64/amd/zen3/gcc-15.2.0.txt | 106 ++++++++ .../x86_64/amd/zen4/clang-20.1.8.txt | 119 +++++++++ .../x86_64/amd/zen4/clang-21.1.8.txt | 119 +++++++++ .../references/x86_64/amd/zen4/gcc-12.3.0.txt | 90 +++++++ .../references/x86_64/amd/zen4/gcc-13.2.0.txt | 98 ++++++++ .../references/x86_64/amd/zen4/gcc-13.3.0.txt | 98 ++++++++ .../references/x86_64/amd/zen4/gcc-14.2.0.txt | 99 ++++++++ .../references/x86_64/amd/zen4/gcc-14.3.0.txt | 99 ++++++++ .../references/x86_64/amd/zen4/gcc-15.2.0.txt | 106 ++++++++ .../x86_64/intel/cascadelake/clang-20.1.8.txt | 119 +++++++++ .../x86_64/intel/cascadelake/clang-21.1.8.txt | 119 +++++++++ .../x86_64/intel/cascadelake/gcc-12.2.0.txt | 90 +++++++ .../x86_64/intel/cascadelake/gcc-12.3.0.txt | 90 +++++++ .../x86_64/intel/cascadelake/gcc-13.2.0.txt | 98 ++++++++ .../x86_64/intel/cascadelake/gcc-13.3.0.txt | 98 ++++++++ .../x86_64/intel/cascadelake/gcc-14.2.0.txt | 99 ++++++++ .../x86_64/intel/cascadelake/gcc-14.3.0.txt | 99 ++++++++ .../x86_64/intel/cascadelake/gcc-15.2.0.txt | 106 ++++++++ .../x86_64/intel/haswell/clang-20.1.8.txt | 118 +++++++++ .../x86_64/intel/haswell/clang-21.1.8.txt | 118 +++++++++ .../x86_64/intel/haswell/gcc-12.2.0.txt | 90 +++++++ .../x86_64/intel/haswell/gcc-12.3.0.txt | 90 +++++++ .../x86_64/intel/haswell/gcc-13.2.0.txt | 98 ++++++++ .../x86_64/intel/haswell/gcc-13.3.0.txt | 98 ++++++++ .../x86_64/intel/haswell/gcc-14.2.0.txt | 99 ++++++++ .../x86_64/intel/haswell/gcc-14.3.0.txt | 99 ++++++++ .../x86_64/intel/haswell/gcc-15.2.0.txt | 106 ++++++++ .../x86_64/intel/icelake/clang-20.1.8.txt | 119 +++++++++ .../x86_64/intel/icelake/clang-21.1.8.txt | 119 +++++++++ .../x86_64/intel/icelake/gcc-12.2.0.txt | 90 +++++++ .../x86_64/intel/icelake/gcc-12.3.0.txt | 90 +++++++ .../x86_64/intel/icelake/gcc-13.2.0.txt | 98 ++++++++ .../x86_64/intel/icelake/gcc-13.3.0.txt | 98 ++++++++ .../x86_64/intel/icelake/gcc-14.2.0.txt | 99 ++++++++ .../x86_64/intel/icelake/gcc-14.3.0.txt | 99 ++++++++ .../x86_64/intel/icelake/gcc-15.2.0.txt | 106 ++++++++ .../intel/sapphirerapids/clang-20.1.8.txt | 119 +++++++++ .../intel/sapphirerapids/clang-21.1.8.txt | 119 +++++++++ .../intel/sapphirerapids/gcc-12.2.0.txt | 90 +++++++ .../intel/sapphirerapids/gcc-12.3.0.txt | 90 +++++++ .../intel/sapphirerapids/gcc-13.2.0.txt | 98 ++++++++ .../intel/sapphirerapids/gcc-13.3.0.txt | 98 ++++++++ .../intel/sapphirerapids/gcc-14.2.0.txt | 99 ++++++++ .../intel/sapphirerapids/gcc-14.3.0.txt | 99 ++++++++ .../intel/sapphirerapids/gcc-15.2.0.txt | 106 ++++++++ .../intel/skylake_avx512/clang-20.1.8.txt | 119 +++++++++ .../intel/skylake_avx512/clang-21.1.8.txt | 119 +++++++++ .../intel/skylake_avx512/gcc-12.2.0.txt | 90 +++++++ .../intel/skylake_avx512/gcc-12.3.0.txt | 90 +++++++ .../intel/skylake_avx512/gcc-13.2.0.txt | 98 ++++++++ .../intel/skylake_avx512/gcc-13.3.0.txt | 98 ++++++++ .../intel/skylake_avx512/gcc-14.2.0.txt | 99 ++++++++ .../intel/skylake_avx512/gcc-14.3.0.txt | 99 ++++++++ .../intel/skylake_avx512/gcc-15.2.0.txt | 106 ++++++++ 94 files changed, 7755 insertions(+) create mode 100755 scripts/native_flags/check_native_flags.sh create mode 100755 scripts/native_flags/get_supported_toolchains.py create mode 100644 scripts/native_flags/references/aarch64/aws/graviton4/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/aarch64/aws/graviton4/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_n1/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/aarch64/neoverse_v1/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen2/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen3/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/amd/zen4/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/cascadelake/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/haswell/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/icelake/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-15.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-20.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-21.1.8.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.2.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.3.0.txt create mode 100644 scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-15.2.0.txt diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 6ed3985a..a16c542d 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -234,6 +234,19 @@ else echo_green ">> Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory!" fi +# Check that the compilers of all supported toolchains translate the native architecture flag into exactly the same +# target flags on this build host as on other build hosts for the same CPU target, to ensure that binaries built on +# different build hosts for the same CPU target are compatible +if [[ ${GENERIC} -eq 1 ]]; then + echo ">> Skipping check of native compiler flags, since this is a generic build" +elif [[ -n "${EESSI_SKIP_NATIVE_FLAGS_CHECK}" ]]; then + echo_yellow ">> Skipping check of native compiler flags, since \$EESSI_SKIP_NATIVE_FLAGS_CHECK is set" +else + ${TOPDIR}/scripts/native_flags/check_native_flags.sh + check_exit_code $? ">> Native compiler flags on this build host are OK" \ + "Native compiler flags check failed, refusing to build on this host (set \$EESSI_SKIP_NATIVE_FLAGS_CHECK to override)" +fi + # avoid that pyc files for EasyBuild are stored in EasyBuild installation directory export PYTHONPYCACHEPREFIX=$TMPDIR/pycache # force Python's stdout and stderr streams to be unbuffered diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh new file mode 100755 index 00000000..12ad6ac7 --- /dev/null +++ b/scripts/native_flags/check_native_flags.sh @@ -0,0 +1,230 @@ +#!/bin/bash +# +# Check that the compilers of all toolchains supported in the current EESSI version translate the "native" +# architecture flag (as used by EasyBuild) into *exactly* the same set of target flags on this build host as +# recorded in a reference for the current CPU target (EESSI_SOFTWARE_SUBDIR). +# +# This guards against having multiple build hosts for the same CPU target that (subtly) differ in which +# instruction set extensions the compilers detect, e.g. due to a different CPU stepping/SKU, different kernel +# version (on aarch64, detection relies on hwcaps in /proc/cpuinfo), or CPU features being masked by a hypervisor. +# If such hosts both build for the same CPU target, the result may be binaries that don't run on all +# systems of that CPU target. +# +# Rather than checking the CPU flags reported by lscpu (or similar), we ask the compiler driver itself what it +# resolves the native flag into, since that's what really matters. As this depends on the compiler version, +# references are stored per CPU target, compiler and compiler version, in: +# /references//-.txt +# +# For GCC, all -m* options passed by the driver to cc1 are taken into account (--param options like +# l1-cache-size are not, since they only affect tuning, and are more likely to differ between CPUs of the same type). +# For Clang, all -target-cpu, -tune-cpu, -target-abi and -target-feature options passed to clang -cc1 are taken +# into account. +# +# Requires an initialised EESSI environment (EESSI module loaded) and Lmod's module command. +# +# usage: check_native_flags.sh [--generate] +# +# --generate (re)generate the reference files for the CPU target of this host, rather than checking against them. +# +# Environment variables: +# EESSI_NATIVE_FLAGS_REFERENCE_DIR - override location of the reference files +# EESSI_NATIVE_FLAGS_ALLOW_MISSING_REFERENCE - if set, a missing reference file only results in a warning +# (by default, it is treated as an error) + +SCRIPT_DIR=$(dirname $(realpath ${BASH_SOURCE[0]})) +TOPDIR=$(realpath ${SCRIPT_DIR}/../..) + +source ${TOPDIR}/scripts/utils.sh + +REFERENCE_DIR=${EESSI_NATIVE_FLAGS_REFERENCE_DIR:-${SCRIPT_DIR}/references} + +generate=0 +while [[ $# -gt 0 ]]; do + case $1 in + --generate) + generate=1 + shift + ;; + -h|--help) + sed -n '2,/^$/p' ${BASH_SOURCE[0]} | sed 's/^# \{0,1\}//' + exit 0 + ;; + *) + fatal_error "Unknown argument: $1" + ;; + esac +done + +check_eessi_initialised +if [[ -z "${EESSI_VERSION}" ]]; then + fatal_error "\$EESSI_VERSION is not set!" +fi +if [[ "$(type -t module)" != "function" ]]; then + fatal_error "The 'module' command is not available!" +fi + +# Native architecture flag as used by EasyBuild (see COMPILER_OPTIMAL_ARCHITECTURE_OPTION +# in easybuild/toolchains/compiler/{gcc,clang,llvm_compilers}.py) +case $(uname -m) in + x86_64) + native_flag='-march=native' + ;; + aarch64|ppc64le) + native_flag='-mcpu=native' + ;; + *) + # RISC-V: GCC/Clang don't support a native flag, EasyBuild uses an explicit -march value there + echo_yellow ">> No native architecture flag known for $(uname -m), skipping check of native compiler flags" + exit 0 + ;; +esac + +# Print the target flags that the GCC driver passes to cc1 when using the native flag, one per line +function gcc_native_flags() { + local cc=$1 + local cc1_line + cc1_line=$(${cc} ${native_flag} -### -E - < /dev/null 2>&1 | awk '$1 ~ /\/cc1$/') + if [[ -z "${cc1_line}" ]]; then + return 1 + fi + # Drop quotes, then retain only -m* options (skipping '--param ') + echo "${cc1_line}" | tr -d '"' | tr -s ' ' '\n' | grep '^-m' +} + +# Print the target options that the Clang driver passes to clang -cc1 when using the native flag, one per line +function clang_native_flags() { + local cc=$1 + local cc1_line + cc1_line=$(${cc} ${native_flag} -### -c -x c - -o /dev/null < /dev/null 2>&1 | grep '"-cc1"') + if [[ -z "${cc1_line}" ]]; then + return 1 + fi + echo "${cc1_line}" | tr -d '"' | tr -s ' ' '\n' \ + | awk '/^-(target-cpu|tune-cpu|target-abi|target-feature)$/ { opt=$0; getline; print opt " " $0 }' +} + +# Check whether the given path is part of an installation provided by a loaded module (as opposed to a compiler +# provided by the compat layer, or the host) +function provided_by_module() { + local path=$1 + local root + for root in $(env | grep '^EBROOT' | cut -f2 -d=); do + if [[ -n "${root}" && "${path}" == "$(realpath ${root})/"* ]]; then + return 0 + fi + done + return 1 +} + +echo ">> Checking native compiler flags for CPU target ${EESSI_SOFTWARE_SUBDIR} (EESSI ${EESSI_VERSION})" +echo ">> Native architecture flag: ${native_flag}" + +toolchains=$(python3 ${SCRIPT_DIR}/get_supported_toolchains.py ${TOPDIR}/eb_hooks.py ${EESSI_VERSION}) +check_exit_code $? ">> Supported toolchains in EESSI ${EESSI_VERSION}: $(echo ${toolchains})" \ + "Failed to determine supported toolchains for EESSI ${EESSI_VERSION}" + +# Determine (unique) set of compilers, by loading each toolchain module (in a subshell) +# Each entry is ' ' +declare -A compilers +module_load_out=$(mktemp) +for toolchain in ${toolchains}; do + if ! module is-avail ${toolchain}; then + echo_yellow ">> WARNING: module for toolchain ${toolchain} is not available, skipping it" + continue + fi + found=$( + module load ${toolchain} > ${module_load_out} 2>&1 || exit 1 + for compiler_type in gcc clang; do + compiler=$(command -v ${compiler_type}) + if [[ -n "${compiler}" ]]; then + compiler=$(realpath ${compiler}) + if provided_by_module ${compiler}; then + echo "${compiler_type} ${compiler}" + fi + fi + done + ) + if [[ $? -ne 0 ]]; then + # This happens for toolchains that are deliberately not supported on this CPU target (e.g. foss/2022b on + # zen4 in EESSI 2023.06): the module then raises an error, which means it can't be used to build either + echo_yellow ">> WARNING: failed to load module for toolchain ${toolchain}, skipping it. Output of 'module load':" + sed 's/^/ /' ${module_load_out} + continue + fi + while read compiler_type compiler; do + if [[ -n "${compiler}" ]]; then + echo ">> Found ${compiler_type} compiler ${compiler} in toolchain ${toolchain}" + compilers[${compiler}]=${compiler_type} + fi + done <<< "${found}" +done +rm -f ${module_load_out} + +if [[ ${#compilers[@]} -eq 0 ]]; then + echo_yellow ">> WARNING: no compilers found to check native compiler flags for!" + exit 0 +fi + +reference_subdir=${REFERENCE_DIR}/${EESSI_SOFTWARE_SUBDIR} +errors=() +missing=() +for compiler in $(echo ${!compilers[@]} | tr ' ' '\n' | sort); do + compiler_type=${compilers[${compiler}]} + if [[ ${compiler_type} == "gcc" ]]; then + version=$(${compiler} -dumpfullversion) + else + version=$(${compiler} -dumpversion) + fi + if [[ -z "${version}" ]]; then + fatal_error "Failed to determine version of ${compiler}" + fi + + flags=$(${compiler_type}_native_flags ${compiler}) + if [[ $? -ne 0 || -z "${flags}" ]]; then + fatal_error "Failed to determine flags that '${native_flag}' translates to for ${compiler}" + fi + + reference_file=${reference_subdir}/${compiler_type}-${version}.txt + if [[ ${generate} -eq 1 ]]; then + mkdir -p ${reference_subdir} + echo "${flags}" > ${reference_file} + echo_green ">> Generated ${reference_file}" + elif [[ ! -f ${reference_file} ]]; then + echo_yellow ">> WARNING: no reference found for ${compiler_type} ${version} (${reference_file})." + echo_yellow " '${native_flag}' translates to the following flags for ${compiler} on this host:" + echo "${flags}" | sed 's/^/ /' + missing+=("${reference_file}") + else + flags_diff=$(diff <(grep -v '^#' ${reference_file}) <(echo "${flags}")) + if [[ $? -eq 0 ]]; then + echo_green ">> Flags for ${compiler_type} ${version} match reference (${reference_file})" + else + echo_red ">> Flags for ${compiler_type} ${version} DO NOT MATCH reference (${reference_file})!" + echo " Difference ('<' = reference, '>' = this host):" + echo "${flags_diff}" | sed 's/^/ /' + errors+=("${compiler_type} ${version}") + fi + fi +done + +if [[ ${#missing[@]} -gt 0 ]]; then + msg="No reference found for ${#missing[@]} compiler(s) for CPU target ${EESSI_SOFTWARE_SUBDIR}." + msg="${msg} These can be created by running '${BASH_SOURCE[0]} --generate' on a build host that is known to be" + msg="${msg} good, and adding the resulting files to the software-layer-scripts repository." + if [[ -n "${EESSI_NATIVE_FLAGS_ALLOW_MISSING_REFERENCE}" ]]; then + echo_yellow ">> WARNING: ${msg}" + else + msg="${msg} Set \$EESSI_NATIVE_FLAGS_ALLOW_MISSING_REFERENCE to only print a warning instead." + fatal_error "${msg}" + fi +fi + +if [[ ${#errors[@]} -gt 0 ]]; then + msg="Native compiler flags on this build host do not match the reference for CPU target" + msg="${msg} ${EESSI_SOFTWARE_SUBDIR} for: ${errors[*]}." + msg="${msg} Building on this host could result in binaries that are not compatible with other systems" + msg="${msg} of the same CPU target!" + fatal_error "${msg}" +fi + +echo_green ">> Native compiler flags check for CPU target ${EESSI_SOFTWARE_SUBDIR} completed" diff --git a/scripts/native_flags/get_supported_toolchains.py b/scripts/native_flags/get_supported_toolchains.py new file mode 100755 index 00000000..e62b7e83 --- /dev/null +++ b/scripts/native_flags/get_supported_toolchains.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# +# Print the top-level toolchains supported in a given EESSI version, one 'name/version' per line. +# +# The list is extracted from EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS in eb_hooks.py (so there is a single source of +# truth), without importing eb_hooks.py itself (which would require EasyBuild to be available). +# Conditional additions like 'EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[].append({...})' are included +# regardless of the condition they are guarded by (those conditions are on the EasyBuild version, which is +# irrelevant for determining which compilers are part of an EESSI version). +# Site-specific toplevel toolchains defined via $EESSI_SITE_TOP_LEVEL_TOOLCHAINS_ are included as well, +# in the same way as is done in eb_hooks.py. +# +# usage: get_supported_toolchains.py + +import ast +import json +import os +import sys + +TOOLCHAINS_VAR = 'EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS' + + +def get_toolchains(hooks_file, eessi_version): + with open(hooks_file) as fh: + tree = ast.parse(fh.read(), filename=hooks_file) + + toolchains = None + appended = [] + for node in ast.walk(tree): + # EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = {...} + if isinstance(node, ast.Assign) and any(getattr(t, 'id', None) == TOOLCHAINS_VAR for t in node.targets): + toolchains = ast.literal_eval(node.value) + # EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[''].append({...}) + elif (isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute) and node.func.attr == 'append' + and isinstance(node.func.value, ast.Subscript) + and getattr(node.func.value.value, 'id', None) == TOOLCHAINS_VAR): + subscript = node.func.value.slice + # Python < 3.9 wraps the subscript in an ast.Index node + subscript = getattr(subscript, 'value', subscript) if type(subscript).__name__ == 'Index' else subscript + version = ast.literal_eval(subscript) + appended.append((version, ast.literal_eval(node.args[0]))) + + if toolchains is None: + sys.stderr.write(f"ERROR: failed to find {TOOLCHAINS_VAR} in {hooks_file}\n") + sys.exit(1) + if eessi_version not in toolchains: + sys.stderr.write(f"ERROR: no supported toolchains defined for EESSI version {eessi_version} in {hooks_file}\n") + sys.exit(1) + + result = list(toolchains[eessi_version]) + result.extend(tc for (version, tc) in appended if version == eessi_version) + + site_var = 'EESSI_SITE_TOP_LEVEL_TOOLCHAINS_' + eessi_version.replace('.', '_') + if os.getenv(site_var): + result.extend(json.loads(os.getenv(site_var))) + + return result + + +def main(): + if len(sys.argv) != 3: + sys.stderr.write(f"usage: {sys.argv[0]} \n") + sys.exit(1) + + seen = set() + for tc in get_toolchains(sys.argv[1], sys.argv[2]): + tc_mod = f"{tc['name']}/{tc['version']}" + if tc_mod not in seen: + seen.add(tc_mod) + print(tc_mod) + + +if __name__ == '__main__': + main() diff --git a/scripts/native_flags/references/aarch64/aws/graviton4/clang-21.1.8.txt b/scripts/native_flags/references/aarch64/aws/graviton4/clang-21.1.8.txt new file mode 100644 index 00000000..ff884e9a --- /dev/null +++ b/scripts/native_flags/references/aarch64/aws/graviton4/clang-21.1.8.txt @@ -0,0 +1,37 @@ +-target-cpu neoverse-v2 +-target-feature +sha2 +-target-feature +sve-sha3 +-target-feature +sve-aes +-target-feature +sha3 +-target-feature +aes +-target-feature +v9a +-target-feature +bf16 +-target-feature +ccidx +-target-feature +complxnum +-target-feature +crc +-target-feature +dotprod +-target-feature +ete +-target-feature +fp-armv8 +-target-feature +fp16fml +-target-feature +fpac +-target-feature +fullfp16 +-target-feature +i8mm +-target-feature +jsconv +-target-feature +lse +-target-feature +mte +-target-feature +neon +-target-feature +pauth +-target-feature +perfmon +-target-feature +rand +-target-feature +ras +-target-feature +rcpc +-target-feature +rdm +-target-feature +spe +-target-feature +ssbs +-target-feature +sve +-target-feature +sve-bitperm +-target-feature +sve2 +-target-feature +trbe +-target-abi aapcs +-target-feature +outline-atomics +-target-feature -fmv diff --git a/scripts/native_flags/references/aarch64/aws/graviton4/gcc-15.2.0.txt b/scripts/native_flags/references/aarch64/aws/graviton4/gcc-15.2.0.txt new file mode 100644 index 00000000..cae11b11 --- /dev/null +++ b/scripts/native_flags/references/aarch64/aws/graviton4/gcc-15.2.0.txt @@ -0,0 +1,5 @@ +-mno-fix-cortex-a53-835769 +-mno-fix-cortex-a53-843419 +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-v2+crc+sve2-aes+sve2-sha3+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/clang-20.1.8.txt b/scripts/native_flags/references/aarch64/neoverse_n1/clang-20.1.8.txt new file mode 100644 index 00000000..6dc9135b --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/clang-20.1.8.txt @@ -0,0 +1,19 @@ +-target-cpu neoverse-n1 +-target-feature +v8.2a +-target-feature +aes +-target-feature +crc +-target-feature +dotprod +-target-feature +fp-armv8 +-target-feature +fullfp16 +-target-feature +lse +-target-feature +neon +-target-feature +perfmon +-target-feature +ras +-target-feature +rcpc +-target-feature +rdm +-target-feature +sha2 +-target-feature +spe +-target-feature +ssbs +-target-abi aapcs +-target-feature +outline-atomics +-target-feature -fmv diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/clang-21.1.8.txt b/scripts/native_flags/references/aarch64/neoverse_n1/clang-21.1.8.txt new file mode 100644 index 00000000..6dc9135b --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/clang-21.1.8.txt @@ -0,0 +1,19 @@ +-target-cpu neoverse-n1 +-target-feature +v8.2a +-target-feature +aes +-target-feature +crc +-target-feature +dotprod +-target-feature +fp-armv8 +-target-feature +fullfp16 +-target-feature +lse +-target-feature +neon +-target-feature +perfmon +-target-feature +ras +-target-feature +rcpc +-target-feature +rdm +-target-feature +sha2 +-target-feature +spe +-target-feature +ssbs +-target-abi aapcs +-target-feature +outline-atomics +-target-feature -fmv diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.2.0.txt new file mode 100644 index 00000000..622bf3d7 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=ares+crypto+ssbs+noprofile diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.3.0.txt new file mode 100644 index 00000000..622bf3d7 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-12.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=ares+crypto+ssbs+noprofile diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.2.0.txt new file mode 100644 index 00000000..9e7621bf --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=ares+crc+crypto+ssbs diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.3.0.txt new file mode 100644 index 00000000..b1030cd5 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-13.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-n1+crc+crypto+ssbs diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.2.0.txt new file mode 100644 index 00000000..b1030cd5 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-n1+crc+crypto+ssbs diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.3.0.txt new file mode 100644 index 00000000..b1030cd5 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-14.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-n1+crc+crypto+ssbs diff --git a/scripts/native_flags/references/aarch64/neoverse_n1/gcc-15.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-15.2.0.txt new file mode 100644 index 00000000..6e5474cf --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_n1/gcc-15.2.0.txt @@ -0,0 +1,5 @@ +-mno-fix-cortex-a53-835769 +-mno-fix-cortex-a53-843419 +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-n1+crc+crypto+ssbs diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/clang-20.1.8.txt b/scripts/native_flags/references/aarch64/neoverse_v1/clang-20.1.8.txt new file mode 100644 index 00000000..44bb70f7 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/clang-20.1.8.txt @@ -0,0 +1,32 @@ +-target-cpu neoverse-v1 +-target-feature +v8.4a +-target-feature +aes +-target-feature +bf16 +-target-feature +ccdp +-target-feature +ccidx +-target-feature +ccpp +-target-feature +complxnum +-target-feature +crc +-target-feature +dotprod +-target-feature +fp-armv8 +-target-feature +fp16fml +-target-feature +fullfp16 +-target-feature +i8mm +-target-feature +jsconv +-target-feature +lse +-target-feature +neon +-target-feature +pauth +-target-feature +perfmon +-target-feature +rand +-target-feature +ras +-target-feature +rcpc +-target-feature +rdm +-target-feature +sha2 +-target-feature +sha3 +-target-feature +sm4 +-target-feature +spe +-target-feature +ssbs +-target-feature +sve +-target-abi aapcs +-target-feature +outline-atomics +-target-feature -fmv diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/clang-21.1.8.txt b/scripts/native_flags/references/aarch64/neoverse_v1/clang-21.1.8.txt new file mode 100644 index 00000000..44bb70f7 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/clang-21.1.8.txt @@ -0,0 +1,32 @@ +-target-cpu neoverse-v1 +-target-feature +v8.4a +-target-feature +aes +-target-feature +bf16 +-target-feature +ccdp +-target-feature +ccidx +-target-feature +ccpp +-target-feature +complxnum +-target-feature +crc +-target-feature +dotprod +-target-feature +fp-armv8 +-target-feature +fp16fml +-target-feature +fullfp16 +-target-feature +i8mm +-target-feature +jsconv +-target-feature +lse +-target-feature +neon +-target-feature +pauth +-target-feature +perfmon +-target-feature +rand +-target-feature +ras +-target-feature +rcpc +-target-feature +rdm +-target-feature +sha2 +-target-feature +sha3 +-target-feature +sm4 +-target-feature +spe +-target-feature +ssbs +-target-feature +sve +-target-abi aapcs +-target-feature +outline-atomics +-target-feature -fmv diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.2.0.txt new file mode 100644 index 00000000..97765490 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=zeus+crypto+sha3+sm4+nodotprod+noprofile+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.3.0.txt new file mode 100644 index 00000000..0a7b3d8b --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-12.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=zeus+crypto+sha3+sm4+noprofile+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.2.0.txt new file mode 100644 index 00000000..3c061564 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=zeus+crc+aes+sha3+sm4+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.3.0.txt new file mode 100644 index 00000000..cbf5f31d --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-13.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-v1+crc+aes+sha3+sm4+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.2.0.txt new file mode 100644 index 00000000..dc13890f --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.2.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-v1+sm4+crc+aes+sha3+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.3.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.3.0.txt new file mode 100644 index 00000000..dc13890f --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-14.3.0.txt @@ -0,0 +1,3 @@ +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-v1+sm4+crc+aes+sha3+nopauth diff --git a/scripts/native_flags/references/aarch64/neoverse_v1/gcc-15.2.0.txt b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-15.2.0.txt new file mode 100644 index 00000000..e9c467c0 --- /dev/null +++ b/scripts/native_flags/references/aarch64/neoverse_v1/gcc-15.2.0.txt @@ -0,0 +1,5 @@ +-mno-fix-cortex-a53-835769 +-mno-fix-cortex-a53-843419 +-mlittle-endian +-mabi=lp64 +-mcpu=neoverse-v1+sm4+crc+aes+sha3+nopauth diff --git a/scripts/native_flags/references/x86_64/amd/zen2/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen2/clang-20.1.8.txt new file mode 100644 index 00000000..0d1d08d4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/clang-20.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu znver2 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature -invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen2/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen2/clang-21.1.8.txt new file mode 100644 index 00000000..0d1d08d4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/clang-21.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu znver2 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature -invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.2.0.txt new file mode 100644 index 00000000..62b49c6d --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.3.0.txt new file mode 100644 index 00000000..62b49c6d --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.2.0.txt new file mode 100644 index 00000000..58fc4178 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.3.0.txt new file mode 100644 index 00000000..58fc4178 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.2.0.txt new file mode 100644 index 00000000..77fccfaf --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.3.0.txt new file mode 100644 index 00000000..77fccfaf --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen2/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen2/gcc-15.2.0.txt new file mode 100644 index 00000000..641c734c --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen2/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=znver2 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=znver2 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen3/clang-20.1.8.txt new file mode 100644 index 00000000..a914e94c --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/clang-20.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu znver3 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature +vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen3/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen3/clang-21.1.8.txt new file mode 100644 index 00000000..a914e94c --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/clang-21.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu znver3 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature +vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.2.0.txt new file mode 100644 index 00000000..9380366c --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.3.0.txt new file mode 100644 index 00000000..9380366c --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.2.0.txt new file mode 100644 index 00000000..6897366e --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.3.0.txt new file mode 100644 index 00000000..6897366e --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.2.0.txt new file mode 100644 index 00000000..71ab99f1 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.3.0.txt new file mode 100644 index 00000000..71ab99f1 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen3/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen3/gcc-15.2.0.txt new file mode 100644 index 00000000..883fb0fc --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen3/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=znver3 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mvpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=znver3 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen4/clang-20.1.8.txt new file mode 100644 index 00000000..d529f19d --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/clang-20.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu znver4 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature +avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen4/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/amd/zen4/clang-21.1.8.txt new file mode 100644 index 00000000..d529f19d --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/clang-21.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu znver4 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature +avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature +clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature +rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature +sse4a diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-12.3.0.txt new file mode 100644 index 00000000..624da582 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.2.0.txt new file mode 100644 index 00000000..a88df381 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.3.0.txt new file mode 100644 index 00000000..a88df381 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.2.0.txt new file mode 100644 index 00000000..f5b46433 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.3.0.txt new file mode 100644 index 00000000..f5b46433 --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/amd/zen4/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/amd/zen4/gcc-15.2.0.txt new file mode 100644 index 00000000..047c1b4a --- /dev/null +++ b/scripts/native_flags/references/x86_64/amd/zen4/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=znver4 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-msse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mclzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=znver4 diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/clang-20.1.8.txt new file mode 100644 index 00000000..5fe07976 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/clang-20.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu cascadelake +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature -vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/clang-21.1.8.txt new file mode 100644 index 00000000..5fe07976 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/clang-21.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu cascadelake +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature -vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.2.0.txt new file mode 100644 index 00000000..eff11d0e --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.3.0.txt new file mode 100644 index 00000000..eff11d0e --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.2.0.txt new file mode 100644 index 00000000..0e64f848 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.3.0.txt new file mode 100644 index 00000000..0e64f848 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.2.0.txt new file mode 100644 index 00000000..87b28120 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.3.0.txt new file mode 100644 index 00000000..87b28120 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-15.2.0.txt new file mode 100644 index 00000000..74ff46b8 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/cascadelake/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=cascadelake +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mavx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=cascadelake diff --git a/scripts/native_flags/references/x86_64/intel/haswell/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/intel/haswell/clang-20.1.8.txt new file mode 100644 index 00000000..46e2bbce --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/clang-20.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu haswell +-target-feature -prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature -xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature -adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature -clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature -clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature -rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/haswell/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/intel/haswell/clang-21.1.8.txt new file mode 100644 index 00000000..46e2bbce --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/clang-21.1.8.txt @@ -0,0 +1,118 @@ +-target-cpu haswell +-target-feature -prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature -xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature -xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature -avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature -sha512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature -adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -vpclmulqdq +-target-feature -avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature -clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature -avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature -avx512bw +-target-feature +sse3 +-target-feature -pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature -clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature -rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature -avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.2.0.txt new file mode 100644 index 00000000..deaa1d8d --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.3.0.txt new file mode 100644 index 00000000..deaa1d8d --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.2.0.txt new file mode 100644 index 00000000..212139d5 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.3.0.txt new file mode 100644 index 00000000..212139d5 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prefetchwt1 +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.2.0.txt new file mode 100644 index 00000000..1b65f5bb --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.3.0.txt new file mode 100644 index 00000000..1b65f5bb --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/haswell/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/intel/haswell/gcc-15.2.0.txt new file mode 100644 index 00000000..5be539e1 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/haswell/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=haswell +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mno-avx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mabm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mno-xsavec +-mxsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=haswell diff --git a/scripts/native_flags/references/x86_64/intel/icelake/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/intel/icelake/clang-20.1.8.txt new file mode 100644 index 00000000..6b6a6be2 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/clang-20.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu icelake-server +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/icelake/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/intel/icelake/clang-21.1.8.txt new file mode 100644 index 00000000..6b6a6be2 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/clang-21.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu icelake-server +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.2.0.txt new file mode 100644 index 00000000..a6c218b4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.3.0.txt new file mode 100644 index 00000000..a6c218b4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.2.0.txt new file mode 100644 index 00000000..55519fc4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.3.0.txt new file mode 100644 index 00000000..55519fc4 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.2.0.txt new file mode 100644 index 00000000..f312a1e5 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.3.0.txt new file mode 100644 index 00000000..f312a1e5 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/icelake/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/intel/icelake/gcc-15.2.0.txt new file mode 100644 index 00000000..fa45cec2 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/icelake/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=icelake-server +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mno-waitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=icelake-server diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-20.1.8.txt new file mode 100644 index 00000000..90839fa3 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-20.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu sapphirerapids +-target-feature +prfchw +-target-feature +cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature +avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature +amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature +avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature +movdiri +-target-feature +serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature +amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature +amx-bf16 +-target-feature +avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature +movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature +waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-21.1.8.txt new file mode 100644 index 00000000..90839fa3 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/clang-21.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu sapphirerapids +-target-feature +prfchw +-target-feature +cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature +avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature +avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature +avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature +amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature +avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature +movdiri +-target-feature +serialize +-target-feature -sha512 +-target-feature +vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature +amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature +gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature +amx-bf16 +-target-feature +avx512bf16 +-target-feature +avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature +sha +-target-feature +movdir64b +-target-feature -ppx +-target-feature +wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature +avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature +avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature +rdpid +-target-feature -fma4 +-target-feature +avx512vbmi +-target-feature -shstk +-target-feature +vaes +-target-feature +waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.2.0.txt new file mode 100644 index 00000000..c3f9ce14 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.3.0.txt new file mode 100644 index 00000000..c3f9ce14 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.2.0.txt new file mode 100644 index 00000000..65bee2cc --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.3.0.txt new file mode 100644 index 00000000..65bee2cc --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mavx512vbmi +-mavx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.2.0.txt new file mode 100644 index 00000000..8e093cef --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.3.0.txt new file mode 100644 index 00000000..8e093cef --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-15.2.0.txt new file mode 100644 index 00000000..60db8a0b --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/sapphirerapids/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=sapphirerapids +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mavx512vbmi +-mavx512ifma +-mavx512vpopcntdq +-mavx512vbmi2 +-mgfni +-mvpclmulqdq +-mavx512vnni +-mavx512bitalg +-mavx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mcldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mmovdir64b +-mmovdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mrdpid +-mrdrnd +-mrdseed +-mno-rtm +-mserialize +-mno-sgx +-msha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mvaes +-mwaitpkg +-mwbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mamx-tile +-mamx-int8 +-mamx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mavxvnni +-mavx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=sapphirerapids diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-20.1.8.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-20.1.8.txt new file mode 100644 index 00000000..1fb4b5d8 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-20.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu skylake-avx512 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature -vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-21.1.8.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-21.1.8.txt new file mode 100644 index 00000000..1fb4b5d8 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/clang-21.1.8.txt @@ -0,0 +1,119 @@ +-target-cpu skylake-avx512 +-target-feature +prfchw +-target-feature -cldemote +-target-feature +avx +-target-feature +aes +-target-feature +sahf +-target-feature +pclmul +-target-feature -xop +-target-feature +crc32 +-target-feature -amx-fp8 +-target-feature +xsaves +-target-feature -avx512fp16 +-target-feature -usermsr +-target-feature -sm4 +-target-feature -egpr +-target-feature +sse4.1 +-target-feature -avx512ifma +-target-feature +xsave +-target-feature +sse4.2 +-target-feature -tsxldtrk +-target-feature -sm3 +-target-feature -ptwrite +-target-feature -widekl +-target-feature -movrs +-target-feature +invpcid +-target-feature +64bit +-target-feature +xsavec +-target-feature -avx10.1-512 +-target-feature -avx512vpopcntdq +-target-feature +cmov +-target-feature -avx512vp2intersect +-target-feature +avx512cd +-target-feature +movbe +-target-feature -avxvnniint8 +-target-feature -ccmp +-target-feature -amx-int8 +-target-feature -kl +-target-feature -avx10.1-256 +-target-feature +evex512 +-target-feature -avxvnni +-target-feature -rtm +-target-feature +adx +-target-feature +avx2 +-target-feature -hreset +-target-feature -movdiri +-target-feature -serialize +-target-feature -sha512 +-target-feature -vpclmulqdq +-target-feature +avx512vl +-target-feature -uintr +-target-feature -cf +-target-feature +clflushopt +-target-feature -raoint +-target-feature -cmpccxadd +-target-feature +bmi +-target-feature -amx-tile +-target-feature +sse +-target-feature -avx10.2-256 +-target-feature -gfni +-target-feature -avxvnniint16 +-target-feature -amx-fp16 +-target-feature -zu +-target-feature -ndd +-target-feature +xsaveopt +-target-feature +rdrnd +-target-feature +avx512f +-target-feature -amx-bf16 +-target-feature -avx512bf16 +-target-feature -avx512vnni +-target-feature -push2pop2 +-target-feature +cx8 +-target-feature +avx512bw +-target-feature +sse3 +-target-feature +pku +-target-feature -nf +-target-feature -amx-tf32 +-target-feature -amx-avx512 +-target-feature +fsgsbase +-target-feature -clzero +-target-feature -mwaitx +-target-feature -lwp +-target-feature +lzcnt +-target-feature -sha +-target-feature -movdir64b +-target-feature -ppx +-target-feature -wbnoinvd +-target-feature -enqcmd +-target-feature -amx-transpose +-target-feature -avx10.2-512 +-target-feature -avxneconvert +-target-feature -tbm +-target-feature -pconfig +-target-feature -amx-complex +-target-feature +ssse3 +-target-feature +cx16 +-target-feature +bmi2 +-target-feature +fma +-target-feature +popcnt +-target-feature -avxifma +-target-feature +f16c +-target-feature -avx512bitalg +-target-feature -rdpru +-target-feature +clwb +-target-feature +mmx +-target-feature +sse2 +-target-feature +rdseed +-target-feature -avx512vbmi2 +-target-feature -prefetchi +-target-feature -amx-movrs +-target-feature -rdpid +-target-feature -fma4 +-target-feature -avx512vbmi +-target-feature -shstk +-target-feature -vaes +-target-feature -waitpkg +-target-feature -sgx +-target-feature +fxsr +-target-feature +avx512dq +-target-feature -sse4a diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.2.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.2.0.txt new file mode 100644 index 00000000..0864ecbb --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.2.0.txt @@ -0,0 +1,90 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.3.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.3.0.txt new file mode 100644 index 00000000..0864ecbb --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-12.3.0.txt @@ -0,0 +1,90 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.2.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.2.0.txt new file mode 100644 index 00000000..05474a61 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.2.0.txt @@ -0,0 +1,98 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.3.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.3.0.txt new file mode 100644 index 00000000..05474a61 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-13.3.0.txt @@ -0,0 +1,98 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512er +-mno-avx512pf +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx5124vnniw +-mno-avx5124fmaps +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mno-prefetchwt1 +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.2.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.2.0.txt new file mode 100644 index 00000000..17102919 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.2.0.txt @@ -0,0 +1,99 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.3.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.3.0.txt new file mode 100644 index 00000000..17102919 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-14.3.0.txt @@ -0,0 +1,99 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mtune=skylake-avx512 diff --git a/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-15.2.0.txt b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-15.2.0.txt new file mode 100644 index 00000000..58206789 --- /dev/null +++ b/scripts/native_flags/references/x86_64/intel/skylake_avx512/gcc-15.2.0.txt @@ -0,0 +1,106 @@ +-march=skylake-avx512 +-mmmx +-mpopcnt +-msse +-msse2 +-msse3 +-mssse3 +-msse4.1 +-msse4.2 +-mavx +-mavx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mfma +-mavx512f +-mbmi +-mbmi2 +-maes +-mpclmul +-mavx512vl +-mavx512bw +-mavx512dq +-mavx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-madx +-mabm +-mno-cldemote +-mclflushopt +-mclwb +-mno-clzero +-mcx16 +-mno-enqcmd +-mf16c +-mfsgsbase +-mfxsr +-mno-hle +-msahf +-mno-lwp +-mlzcnt +-mmovbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mpku +-mprfchw +-mno-ptwrite +-mno-rdpid +-mrdrnd +-mrdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mxsave +-mxsavec +-mxsaveopt +-mxsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=skylake-avx512 From c99eba12c37a63aeece275e0946227a1dde40a07 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:49:13 +0200 Subject: [PATCH 02/16] Apply batched suggestions from code review Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- scripts/native_flags/check_native_flags.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh index 12ad6ac7..08e1ee96 100755 --- a/scripts/native_flags/check_native_flags.sh +++ b/scripts/native_flags/check_native_flags.sh @@ -193,11 +193,13 @@ for compiler in $(echo ${!compilers[@]} | tr ' ' '\n' | sort); do echo_yellow ">> WARNING: no reference found for ${compiler_type} ${version} (${reference_file})." echo_yellow " '${native_flag}' translates to the following flags for ${compiler} on this host:" echo "${flags}" | sed 's/^/ /' + echo_yellow "To create a reference file, simply copy the above list of flags (without indentiation) into the file ${reference_file} and add that to the `EESSI/software-layer-scripts` repository." missing+=("${reference_file}") else flags_diff=$(diff <(grep -v '^#' ${reference_file}) <(echo "${flags}")) if [[ $? -eq 0 ]]; then - echo_green ">> Flags for ${compiler_type} ${version} match reference (${reference_file})" + echo_green ">> Flags for ${compiler_type} ${version} match reference (${reference_file}):" + echo "${flags}" | sed 's/^/ /' else echo_red ">> Flags for ${compiler_type} ${version} DO NOT MATCH reference (${reference_file})!" echo " Difference ('<' = reference, '>' = this host):" From 28130ee3d28132179e75477c2ae4cb93c93ac284 Mon Sep 17 00:00:00 2001 From: casparvl Date: Thu, 1 Oct 2026 15:51:18 +0000 Subject: [PATCH 03/16] Change to a neutral line, the error is now reported by the fatal_error call --- scripts/native_flags/check_native_flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh index 08e1ee96..bf2a2e3a 100755 --- a/scripts/native_flags/check_native_flags.sh +++ b/scripts/native_flags/check_native_flags.sh @@ -190,7 +190,7 @@ for compiler in $(echo ${!compilers[@]} | tr ' ' '\n' | sort); do echo "${flags}" > ${reference_file} echo_green ">> Generated ${reference_file}" elif [[ ! -f ${reference_file} ]]; then - echo_yellow ">> WARNING: no reference found for ${compiler_type} ${version} (${reference_file})." + echo_yellow ">> No reference found for ${compiler_type} ${version} (${reference_file})." echo_yellow " '${native_flag}' translates to the following flags for ${compiler} on this host:" echo "${flags}" | sed 's/^/ /' echo_yellow "To create a reference file, simply copy the above list of flags (without indentiation) into the file ${reference_file} and add that to the `EESSI/software-layer-scripts` repository." From d00d374923a4b1cfe85f61f33738de5e653ea9a7 Mon Sep 17 00:00:00 2001 From: casparvl Date: Thu, 1 Oct 2026 15:53:39 +0000 Subject: [PATCH 04/16] Fix typo and backticks issue --- scripts/native_flags/check_native_flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh index bf2a2e3a..99a002e6 100755 --- a/scripts/native_flags/check_native_flags.sh +++ b/scripts/native_flags/check_native_flags.sh @@ -193,7 +193,7 @@ for compiler in $(echo ${!compilers[@]} | tr ' ' '\n' | sort); do echo_yellow ">> No reference found for ${compiler_type} ${version} (${reference_file})." echo_yellow " '${native_flag}' translates to the following flags for ${compiler} on this host:" echo "${flags}" | sed 's/^/ /' - echo_yellow "To create a reference file, simply copy the above list of flags (without indentiation) into the file ${reference_file} and add that to the `EESSI/software-layer-scripts` repository." + echo_yellow "To create a reference file, simply copy the above list of flags (without indentation) into the file ${reference_file} and add that to the EESSI/software-layer-scripts repository." missing+=("${reference_file}") else flags_diff=$(diff <(grep -v '^#' ${reference_file}) <(echo "${flags}")) From e670b6f257e6a113f3d4523d998b49ee94db6892 Mon Sep 17 00:00:00 2001 From: casparvl Date: Thu, 1 Oct 2026 16:13:46 +0000 Subject: [PATCH 05/16] Move supported toplevel toolchains from eb_hooks.py into a separate JSON file The supported toplevel toolchains per EESSI version are now defined in eessi_supported_toolchains.json rather than in eb_hooks.py itself, so that they can also be used by other scripts without having to parse (or import) the hooks file. - eessi_supported_toolchains.json is located next to eb_hooks.py, both in the repository and when installed in /init/easybuild/ by install_scripts.sh. eb_hooks.py locates it relative to its own location. - Toolchains that can only be installed with a recent enough EasyBuild version (lfoss/2025b, rompi/2025a) now specify 'min_easybuild_version' instead of being appended conditionally in eb_hooks.py. - CI also checks that the deployed eessi_supported_toolchains.json is up-to-date, like is done for eb_hooks.py. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test-eb-hooks.yml | 22 +++++++++++++ eb_hooks.py | 49 +++++++++++++++-------------- eessi_supported_toolchains.json | 18 +++++++++++ install_scripts.sh | 1 + 4 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 eessi_supported_toolchains.json diff --git a/.github/workflows/test-eb-hooks.yml b/.github/workflows/test-eb-hooks.yml index dfcc576c..bf8a48cc 100644 --- a/.github/workflows/test-eb-hooks.yml +++ b/.github/workflows/test-eb-hooks.yml @@ -51,6 +51,28 @@ jobs: module load EESSI-extend diff "$TEMP_FILE" "$EASYBUILD_HOOKS" + - name: Check whether eessi_supported_toolchains.json (used by eb_hooks.py) is up-to-date + if: ${{ github.event_name == 'pull_request' }} + run: | + FILE="eessi_supported_toolchains.json" + TEMP_FILE="$(mktemp)" + + # Fetch base branch + git fetch origin ${{ github.base_ref }} + + # Check if the file has changed in the PR + if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^$FILE$"; then + echo "$FILE changed in PR. Using PR version." + cp "$FILE" "$TEMP_FILE" + else + echo "File not changed in PR. Using default branch version." + git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" + fi + + # Compare to what is shipped next to the hooks in the repository + module load EESSI-extend + diff "$TEMP_FILE" "$(dirname $EASYBUILD_HOOKS)/$FILE" + check_eb_hooks_functionality: runs-on: ubuntu-24.04 strategy: diff --git a/eb_hooks.py b/eb_hooks.py index fc26f88b..547f9e0e 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -67,31 +67,32 @@ STACK_REPROD_SUBDIR = 'reprod' -EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = { - '2023.06': [ - {'name': 'foss', 'version': '2022b'}, - {'name': 'foss', 'version': '2023a'}, - {'name': 'foss', 'version': '2023b'}, - ], - '2025.06': [ - {'name': 'foss', 'version': '2024a'}, - {'name': 'foss', 'version': '2025a'}, - {'name': 'foss', 'version': '2025b'}, - ], - '2026.06': [ - {'name': 'foss', 'version': '2026.1'}, - {'name': 'lfoss', 'version': '2026.1'}, - ], -} -if EASYBUILD_VERSION >= '5.2.0': - EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS['2025.06'].append( - {'name': 'lfoss', 'version': '2025b'} - ) -if EASYBUILD_VERSION >= '5.3.1': - EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS['2025.06'].append( - {'name': 'rompi', 'version': '2025a'} - ) +def load_supported_top_level_toolchains(): + """ + Load the supported top-level toolchains per EESSI version from eessi_supported_toolchains.json, + which is located next to this hooks file (both in the software-layer-scripts repository, and when installed + in /init/easybuild). Toolchains that require a more recent EasyBuild version than the one + being used (as specified via 'min_easybuild_version') are left out. + """ + toolchains_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.json') + try: + with open(toolchains_file) as fh: + toolchains = json.load(fh) + except (OSError, ValueError) as err: + raise EasyBuildError(f"Failed to load supported toolchains from {toolchains_file} " + f"(it is expected to be located next to the EasyBuild hooks file): {err}") + + return { + eessi_version: [ + {'name': tc['name'], 'version': tc['version']} for tc in tcs + if EASYBUILD_VERSION >= tc.get('min_easybuild_version', '0') + ] + for eessi_version, tcs in toolchains.items() + } + + +EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = load_supported_top_level_toolchains() # Supported compute capabilities by CUDA toolkit version # Obtained by installing all CUDAs from 12.0.0 to 13.3.0, then using: diff --git a/eessi_supported_toolchains.json b/eessi_supported_toolchains.json new file mode 100644 index 00000000..d89d38fe --- /dev/null +++ b/eessi_supported_toolchains.json @@ -0,0 +1,18 @@ +{ + "2023.06": [ + {"name": "foss", "version": "2022b"}, + {"name": "foss", "version": "2023a"}, + {"name": "foss", "version": "2023b"} + ], + "2025.06": [ + {"name": "foss", "version": "2024a"}, + {"name": "foss", "version": "2025a"}, + {"name": "foss", "version": "2025b"}, + {"name": "lfoss", "version": "2025b", "min_easybuild_version": "5.2.0"}, + {"name": "rompi", "version": "2025a", "min_easybuild_version": "5.3.1"} + ], + "2026.06": [ + {"name": "foss", "version": "2026.1"}, + {"name": "lfoss", "version": "2026.1"} + ] +} diff --git a/install_scripts.sh b/install_scripts.sh index 48745a3d..29ffcf24 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -225,6 +225,7 @@ fi # Copy over EasyBuild hooks file used for installations hook_files=( eb_hooks.py + eessi_supported_toolchains.json ) copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" From 32e3f9ce4f0a0e27b62b4766af79d558d28f9e2f Mon Sep 17 00:00:00 2001 From: casparvl Date: Thu, 1 Oct 2026 16:13:53 +0000 Subject: [PATCH 06/16] Use eessi_supported_toolchains.json to determine supported toolchains Now that the supported toplevel toolchains are defined in eessi_supported_toolchains.json, read them from there instead of extracting them from eb_hooks.py. Co-Authored-By: Claude Opus 5.5 --- scripts/native_flags/check_native_flags.sh | 2 +- .../native_flags/get_supported_toolchains.py | 45 +++++-------------- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh index 99a002e6..6aee55b4 100755 --- a/scripts/native_flags/check_native_flags.sh +++ b/scripts/native_flags/check_native_flags.sh @@ -119,7 +119,7 @@ function provided_by_module() { echo ">> Checking native compiler flags for CPU target ${EESSI_SOFTWARE_SUBDIR} (EESSI ${EESSI_VERSION})" echo ">> Native architecture flag: ${native_flag}" -toolchains=$(python3 ${SCRIPT_DIR}/get_supported_toolchains.py ${TOPDIR}/eb_hooks.py ${EESSI_VERSION}) +toolchains=$(python3 ${SCRIPT_DIR}/get_supported_toolchains.py ${TOPDIR}/eessi_supported_toolchains.json ${EESSI_VERSION}) check_exit_code $? ">> Supported toolchains in EESSI ${EESSI_VERSION}: $(echo ${toolchains})" \ "Failed to determine supported toolchains for EESSI ${EESSI_VERSION}" diff --git a/scripts/native_flags/get_supported_toolchains.py b/scripts/native_flags/get_supported_toolchains.py index e62b7e83..c34f0cf7 100755 --- a/scripts/native_flags/get_supported_toolchains.py +++ b/scripts/native_flags/get_supported_toolchains.py @@ -2,53 +2,30 @@ # # Print the top-level toolchains supported in a given EESSI version, one 'name/version' per line. # -# The list is extracted from EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS in eb_hooks.py (so there is a single source of -# truth), without importing eb_hooks.py itself (which would require EasyBuild to be available). -# Conditional additions like 'EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[].append({...})' are included -# regardless of the condition they are guarded by (those conditions are on the EasyBuild version, which is -# irrelevant for determining which compilers are part of an EESSI version). +# The list is read from eessi_supported_toolchains.json, which is also used by eb_hooks.py. +# Toolchains are included regardless of their 'min_easybuild_version' (that only determines whether the +# EasyBuild version being used can install that toolchain, which is irrelevant for determining which compilers are +# part of an EESSI version). # Site-specific toplevel toolchains defined via $EESSI_SITE_TOP_LEVEL_TOOLCHAINS_ are included as well, # in the same way as is done in eb_hooks.py. # -# usage: get_supported_toolchains.py +# usage: get_supported_toolchains.py -import ast import json import os import sys -TOOLCHAINS_VAR = 'EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS' +def get_toolchains(toolchains_file, eessi_version): + with open(toolchains_file) as fh: + toolchains = json.load(fh) -def get_toolchains(hooks_file, eessi_version): - with open(hooks_file) as fh: - tree = ast.parse(fh.read(), filename=hooks_file) - - toolchains = None - appended = [] - for node in ast.walk(tree): - # EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = {...} - if isinstance(node, ast.Assign) and any(getattr(t, 'id', None) == TOOLCHAINS_VAR for t in node.targets): - toolchains = ast.literal_eval(node.value) - # EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[''].append({...}) - elif (isinstance(node, ast.Call) and isinstance(node.func, ast.Attribute) and node.func.attr == 'append' - and isinstance(node.func.value, ast.Subscript) - and getattr(node.func.value.value, 'id', None) == TOOLCHAINS_VAR): - subscript = node.func.value.slice - # Python < 3.9 wraps the subscript in an ast.Index node - subscript = getattr(subscript, 'value', subscript) if type(subscript).__name__ == 'Index' else subscript - version = ast.literal_eval(subscript) - appended.append((version, ast.literal_eval(node.args[0]))) - - if toolchains is None: - sys.stderr.write(f"ERROR: failed to find {TOOLCHAINS_VAR} in {hooks_file}\n") - sys.exit(1) if eessi_version not in toolchains: - sys.stderr.write(f"ERROR: no supported toolchains defined for EESSI version {eessi_version} in {hooks_file}\n") + sys.stderr.write(f"ERROR: no supported toolchains defined for EESSI version {eessi_version} " + f"in {toolchains_file}\n") sys.exit(1) result = list(toolchains[eessi_version]) - result.extend(tc for (version, tc) in appended if version == eessi_version) site_var = 'EESSI_SITE_TOP_LEVEL_TOOLCHAINS_' + eessi_version.replace('.', '_') if os.getenv(site_var): @@ -59,7 +36,7 @@ def get_toolchains(hooks_file, eessi_version): def main(): if len(sys.argv) != 3: - sys.stderr.write(f"usage: {sys.argv[0]} \n") + sys.stderr.write(f"usage: {sys.argv[0]} \n") sys.exit(1) seen = set() From 986d210dd97ea8b9551e6c117d68678ce857d691 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 5 Oct 2026 16:53:17 +0200 Subject: [PATCH 07/16] Address review comments on supported toolchains JSON - Allow setting the location of the supported toolchains file through EESSI_SUPPORTED_TOOLCHAINS_FILE (default: next to eb_hooks.py), with specific errors for a missing file and for invalid JSON - Document return value of load_supported_top_level_toolchains() - Rename hook_files to easybuild_init_files in install_scripts.sh - Rename test-eb-hooks.yml to test-eb-init-files.yml and check all init files in a single loop instead of duplicating the step - Add unit tests for the JSON format and loader, run in CI only when relevant files change Co-Authored-By: Claude Sonnet 5.5 --- .../workflows/test-eb-hooks-toolchains.yml | 33 +++++ ...st-eb-hooks.yml => test-eb-init-files.yml} | 62 ++++------ eb_hooks.py | 41 +++++-- install_scripts.sh | 6 +- tests/eb_hooks/test_supported_toolchains.py | 113 ++++++++++++++++++ 5 files changed, 205 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/test-eb-hooks-toolchains.yml rename .github/workflows/{test-eb-hooks.yml => test-eb-init-files.yml} (79%) create mode 100644 tests/eb_hooks/test_supported_toolchains.py diff --git a/.github/workflows/test-eb-hooks-toolchains.yml b/.github/workflows/test-eb-hooks-toolchains.yml new file mode 100644 index 00000000..0f481390 --- /dev/null +++ b/.github/workflows/test-eb-hooks-toolchains.yml @@ -0,0 +1,33 @@ +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: Unit tests for supported toolchains in EasyBuild hooks +on: + push: + paths: + - eb_hooks.py + - eessi_supported_toolchains.json + - tests/eb_hooks/** + - .github/workflows/test-eb-hooks-toolchains.yml + pull_request: + paths: + - eb_hooks.py + - eessi_supported_toolchains.json + - tests/eb_hooks/** + - .github/workflows/test-eb-hooks-toolchains.yml + workflow_dispatch: +permissions: + contents: read # to fetch code (actions/checkout) +jobs: + test_supported_toolchains: + runs-on: ubuntu-24.04 + steps: + - name: Check out software-layer repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Install EasyBuild and pytest + run: | + python3 -m venv "$RUNNER_TEMP/venv" + "$RUNNER_TEMP/venv/bin/pip" install easybuild pytest + + - name: Run unit tests + run: | + "$RUNNER_TEMP/venv/bin/python" -m pytest -v tests/eb_hooks diff --git a/.github/workflows/test-eb-hooks.yml b/.github/workflows/test-eb-init-files.yml similarity index 79% rename from .github/workflows/test-eb-hooks.yml rename to .github/workflows/test-eb-init-files.yml index bf8a48cc..546b9d57 100644 --- a/.github/workflows/test-eb-hooks.yml +++ b/.github/workflows/test-eb-init-files.yml @@ -1,5 +1,5 @@ # documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions -name: Run checks on EasyBuild hooks script +name: Run checks on EasyBuild hooks script and related init files on: push: pull_request: @@ -26,52 +26,36 @@ jobs: eessi_stack_version: ${{matrix.EESSI_VERSION}} use_eessi_module: true - - name: Check whether eb_hooks.py script is up-to-date + - name: Check whether eb_hooks.py and related files are up-to-date if: ${{ github.event_name == 'pull_request' }} run: | - FILE="eb_hooks.py" - TEMP_FILE="$(mktemp)" + # Files that are installed in the same directory as the hooks, and have to be up-to-date + FILES=(eb_hooks.py eessi_supported_toolchains.json) # Fetch base branch git fetch origin ${{ github.base_ref }} - # Check if the hooks has changed in the PR - if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^$FILE$"; then - echo "Hooks changed in PR. Using PR version." - cp "$FILE" "$TEMP_FILE" - else - echo "File not changed in PR. Using default branch version." - git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" - fi - - # replace placeholder (as is also done in install_scripts.sh) - sed -i "s//${{matrix.EESSI_VERSION}}/g" "${TEMP_FILE}" - - # Compare the hooks to what is shipped in the repository module load EESSI-extend - diff "$TEMP_FILE" "$EASYBUILD_HOOKS" - - - name: Check whether eessi_supported_toolchains.json (used by eb_hooks.py) is up-to-date - if: ${{ github.event_name == 'pull_request' }} - run: | - FILE="eessi_supported_toolchains.json" - TEMP_FILE="$(mktemp)" - # Fetch base branch - git fetch origin ${{ github.base_ref }} - - # Check if the file has changed in the PR - if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^$FILE$"; then - echo "$FILE changed in PR. Using PR version." - cp "$FILE" "$TEMP_FILE" - else - echo "File not changed in PR. Using default branch version." - git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" - fi - - # Compare to what is shipped next to the hooks in the repository - module load EESSI-extend - diff "$TEMP_FILE" "$(dirname $EASYBUILD_HOOKS)/$FILE" + for FILE in "${FILES[@]}"; do + echo "Checking whether $FILE is up-to-date" + TEMP_FILE="$(mktemp)" + + # Check if the file has changed in the PR + if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^$FILE$"; then + echo "$FILE changed in PR. Using PR version." + cp "$FILE" "$TEMP_FILE" + else + echo "$FILE not changed in PR. Using default branch version." + git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" + fi + + # replace placeholder (as is also done in install_scripts.sh) + sed -i "s//${{matrix.EESSI_VERSION}}/g" "${TEMP_FILE}" + + # Compare to what is shipped in the repository (all files are installed in the same directory as the hooks) + diff "$TEMP_FILE" "$(dirname "$EASYBUILD_HOOKS")/$FILE" + done check_eb_hooks_functionality: runs-on: ubuntu-24.04 diff --git a/eb_hooks.py b/eb_hooks.py index 547f9e0e..0ffc30d1 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -67,21 +67,46 @@ STACK_REPROD_SUBDIR = 'reprod' +# Environment variable that can be used to point to a custom JSON file with the supported top-level toolchains +SUPPORTED_TOOLCHAINS_FILE_ENVVAR = 'EESSI_SUPPORTED_TOOLCHAINS_FILE' + def load_supported_top_level_toolchains(): """ - Load the supported top-level toolchains per EESSI version from eessi_supported_toolchains.json, - which is located next to this hooks file (both in the software-layer-scripts repository, and when installed - in /init/easybuild). Toolchains that require a more recent EasyBuild version than the one - being used (as specified via 'min_easybuild_version') are left out. + Load the supported top-level toolchains per EESSI version from a JSON file. + + The location of the JSON file can be set through the environment variable EESSI_SUPPORTED_TOOLCHAINS_FILE. + If that is not set, eessi_supported_toolchains.json is expected next to this hooks file (both in the + software-layer-scripts repository, and when installed in /init/easybuild). + + Toolchains that require a more recent EasyBuild version than the one being used (as specified via + 'min_easybuild_version') are left out. + + Returns: + supported_toolchains (dict): maps each EESSI version to a list of dicts with the 'name' and 'version' + of a supported top-level toolchain """ - toolchains_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.json') + default_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.json') + toolchains_file = os.getenv(SUPPORTED_TOOLCHAINS_FILE_ENVVAR) + envvar_msg = f" (set via ${SUPPORTED_TOOLCHAINS_FILE_ENVVAR})" + if not toolchains_file: + toolchains_file = default_file + envvar_msg = "" + try: with open(toolchains_file) as fh: toolchains = json.load(fh) - except (OSError, ValueError) as err: - raise EasyBuildError(f"Failed to load supported toolchains from {toolchains_file} " - f"(it is expected to be located next to the EasyBuild hooks file): {err}") + except OSError as err: + msg = (f"Failed to read the file with supported toolchains {toolchains_file}{envvar_msg}: {err}. " + f"By default, it is expected next to the EasyBuild hooks file; its location can be configured " + f"through the environment variable {SUPPORTED_TOOLCHAINS_FILE_ENVVAR}.") + if envvar_msg and os.path.isfile(default_file): + msg += (f" Note that a file with supported toolchains does exist in the default location {default_file}. " + f"If that is the file you intended to use, unset {SUPPORTED_TOOLCHAINS_FILE_ENVVAR}.") + raise EasyBuildError(msg) + except ValueError as err: + raise EasyBuildError(f"The file with supported toolchains {toolchains_file}{envvar_msg} " + f"does not contain valid JSON: {err}") return { eessi_version: [ diff --git a/install_scripts.sh b/install_scripts.sh index 29ffcf24..b4a36383 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -222,12 +222,12 @@ if [[ -d ${host_injections_easystacks_dir} ]]; then copy_files_by_list ${host_injections_easystacks_dir} ${INSTALL_PREFIX}/scripts/gpu_support/nvidia/easystacks "${host_injections_easystacks[@]}" fi -# Copy over EasyBuild hooks file used for installations -hook_files=( +# Copy over EasyBuild hooks file used for installations (and the files it needs, which have to be located next to it) +easybuild_init_files=( eb_hooks.py eessi_supported_toolchains.json ) -copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" +copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${easybuild_init_files[@]}" # replace version placeholders in scripts; # note: the commands below are always run, regardless of whether the scripts were changed, diff --git a/tests/eb_hooks/test_supported_toolchains.py b/tests/eb_hooks/test_supported_toolchains.py new file mode 100644 index 00000000..ad79c545 --- /dev/null +++ b/tests/eb_hooks/test_supported_toolchains.py @@ -0,0 +1,113 @@ +# Unit tests for the supported top-level toolchains (eessi_supported_toolchains.json) +# and the function in eb_hooks.py that loads them. +# Requires EasyBuild to be importable, e.g.: pip install easybuild pytest +import json +import os +import sys + +import pytest + +REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) +sys.path.insert(0, REPO_ROOT) + +import eb_hooks # noqa: E402 +from easybuild.tools.build_log import EasyBuildError # noqa: E402 + +TOOLCHAINS_FILE = os.path.join(REPO_ROOT, 'eessi_supported_toolchains.json') +ENVVAR = 'EESSI_SUPPORTED_TOOLCHAINS_FILE' + + +@pytest.fixture(autouse=True) +def clean_env(monkeypatch): + monkeypatch.delenv(ENVVAR, raising=False) + + +def write_json(path, content): + path.write_text(content if isinstance(content, str) else json.dumps(content)) + return str(path) + + +def test_json_format(): + """Check that the shipped JSON file has the expected structure.""" + with open(TOOLCHAINS_FILE) as fh: + data = json.load(fh) + + assert isinstance(data, dict) and data + for eessi_version, toolchains in data.items(): + assert isinstance(eessi_version, str) + assert isinstance(toolchains, list) and toolchains, f"No toolchains for {eessi_version}" + for tc in toolchains: + assert set(tc) <= {'name', 'version', 'min_easybuild_version'}, tc + assert isinstance(tc.get('name'), str) and tc['name'], tc + assert isinstance(tc.get('version'), str) and tc['version'], tc + if 'min_easybuild_version' in tc: + assert isinstance(tc['min_easybuild_version'], str), tc + # no duplicates + pairs = [(tc['name'], tc['version']) for tc in toolchains] + assert len(pairs) == len(set(pairs)), f"Duplicate toolchains for {eessi_version}" + + +def test_load_default_location(): + """Without the environment variable, the file next to eb_hooks.py is used.""" + result = eb_hooks.load_supported_top_level_toolchains() + assert set(result) == set(json.load(open(TOOLCHAINS_FILE))) + for tcs in result.values(): + for tc in tcs: + assert set(tc) == {'name', 'version'} + + +@pytest.mark.parametrize('eb_version, lfoss_present, rompi_present', [ + ('5.1.0', False, False), + ('5.2.0', True, False), + ('5.3.0', True, False), + ('5.3.1', True, True), + ('5.4.0', True, True), +]) +def test_min_easybuild_version(monkeypatch, eb_version, lfoss_present, rompi_present): + monkeypatch.setattr(eb_hooks, 'EASYBUILD_VERSION', eb_version) + tcs = eb_hooks.load_supported_top_level_toolchains()['2025.06'] + assert ({'name': 'lfoss', 'version': '2025b'} in tcs) == lfoss_present + assert ({'name': 'rompi', 'version': '2025a'} in tcs) == rompi_present + # toolchains without a minimum EasyBuild version are always there + assert {'name': 'foss', 'version': '2025b'} in tcs + + +def test_envvar_overrides_location(monkeypatch, tmp_path): + custom = write_json(tmp_path / 'custom.json', {'2099.01': [{'name': 'foo', 'version': '1'}]}) + monkeypatch.setenv(ENVVAR, custom) + assert eb_hooks.load_supported_top_level_toolchains() == {'2099.01': [{'name': 'foo', 'version': '1'}]} + + +def test_envvar_missing_file(monkeypatch, tmp_path): + missing = str(tmp_path / 'does_not_exist.json') + monkeypatch.setenv(ENVVAR, missing) + with pytest.raises(EasyBuildError) as excinfo: + eb_hooks.load_supported_top_level_toolchains() + msg = str(excinfo.value) + assert missing in msg + assert ENVVAR in msg + # the file in the default location exists, so the user should be pointed to it and told how to use it + assert TOOLCHAINS_FILE in msg + assert f"unset {ENVVAR}" in msg + + +def test_missing_default_file(monkeypatch, tmp_path): + monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) + with pytest.raises(EasyBuildError) as excinfo: + eb_hooks.load_supported_top_level_toolchains() + msg = str(excinfo.value) + assert str(tmp_path / 'eessi_supported_toolchains.json') in msg + assert ENVVAR in msg # mentions how to configure the location + assert 'unset' not in msg + + +@pytest.mark.parametrize('use_envvar', [False, True]) +def test_invalid_json(monkeypatch, tmp_path, use_envvar): + bad = write_json(tmp_path / 'bad.json', '{"2025.06": [') + if use_envvar: + monkeypatch.setenv(ENVVAR, bad) + else: + monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) + os.rename(bad, tmp_path / 'eessi_supported_toolchains.json') + with pytest.raises(EasyBuildError, match='does not contain valid JSON'): + eb_hooks.load_supported_top_level_toolchains() From fe8f18224aa84d0c48168a1a2ac449a3dc5f3b53 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 5 Oct 2026 17:13:08 +0200 Subject: [PATCH 08/16] Test toolchain loader with dummy JSON files instead of the shipped one Only the structure of the shipped eessi_supported_toolchains.json is tested now; the behaviour of load_supported_top_level_toolchains() is tested using JSON files created on the fly, so the toolchain content is not duplicated in the tests. Co-Authored-By: Claude Sonnet 5.5 --- tests/eb_hooks/test_supported_toolchains.py | 105 +++++++++++++------- 1 file changed, 71 insertions(+), 34 deletions(-) diff --git a/tests/eb_hooks/test_supported_toolchains.py b/tests/eb_hooks/test_supported_toolchains.py index ad79c545..4f0546fc 100644 --- a/tests/eb_hooks/test_supported_toolchains.py +++ b/tests/eb_hooks/test_supported_toolchains.py @@ -47,38 +47,66 @@ def test_json_format(): assert len(pairs) == len(set(pairs)), f"Duplicate toolchains for {eessi_version}" -def test_load_default_location(): +DEFAULT_FILENAME = 'eessi_supported_toolchains.json' + + +@pytest.fixture +def default_dir(monkeypatch, tmp_path): + """Make the 'directory of eb_hooks.py' (i.e. the default location of the JSON file) an empty temporary dir.""" + monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) + return tmp_path + + +def test_load_default_location(default_dir): """Without the environment variable, the file next to eb_hooks.py is used.""" - result = eb_hooks.load_supported_top_level_toolchains() - assert set(result) == set(json.load(open(TOOLCHAINS_FILE))) - for tcs in result.values(): - for tc in tcs: - assert set(tc) == {'name', 'version'} - - -@pytest.mark.parametrize('eb_version, lfoss_present, rompi_present', [ - ('5.1.0', False, False), - ('5.2.0', True, False), - ('5.3.0', True, False), - ('5.3.1', True, True), - ('5.4.0', True, True), + write_json(default_dir / DEFAULT_FILENAME, { + '2099.01': [{'name': 'foo', 'version': '1'}, {'name': 'bar', 'version': '2'}], + '2099.02': [{'name': 'baz', 'version': '3'}], + }) + assert eb_hooks.load_supported_top_level_toolchains() == { + '2099.01': [{'name': 'foo', 'version': '1'}, {'name': 'bar', 'version': '2'}], + '2099.02': [{'name': 'baz', 'version': '3'}], + } + + +@pytest.mark.parametrize('eb_version, expected', [ + ('4.9.0', ['always']), + ('5.2.0', ['always', 'since_5_2_0']), + ('5.2.1', ['always', 'since_5_2_0']), + ('5.3.0', ['always', 'since_5_2_0']), + ('5.3.1', ['always', 'since_5_2_0', 'since_5_3_1']), + ('6.0.0', ['always', 'since_5_2_0', 'since_5_3_1']), ]) -def test_min_easybuild_version(monkeypatch, eb_version, lfoss_present, rompi_present): +def test_min_easybuild_version(monkeypatch, default_dir, eb_version, expected): + """Toolchains with a 'min_easybuild_version' are only included for that EasyBuild version or newer.""" + write_json(default_dir / DEFAULT_FILENAME, { + '2099.01': [ + {'name': 'always', 'version': '1'}, + {'name': 'since_5_2_0', 'version': '1', 'min_easybuild_version': '5.2.0'}, + {'name': 'since_5_3_1', 'version': '1', 'min_easybuild_version': '5.3.1'}, + ], + '2099.02': [ + {'name': 'only_future', 'version': '1', 'min_easybuild_version': '99.0.0'}, + ], + }) monkeypatch.setattr(eb_hooks, 'EASYBUILD_VERSION', eb_version) - tcs = eb_hooks.load_supported_top_level_toolchains()['2025.06'] - assert ({'name': 'lfoss', 'version': '2025b'} in tcs) == lfoss_present - assert ({'name': 'rompi', 'version': '2025a'} in tcs) == rompi_present - # toolchains without a minimum EasyBuild version are always there - assert {'name': 'foss', 'version': '2025b'} in tcs + result = eb_hooks.load_supported_top_level_toolchains() + assert [tc['name'] for tc in result['2099.01']] == expected + # An EESSI version for which no toolchain is supported by this EasyBuild version is kept, with an empty list + assert result['2099.02'] == [] + # The minimum version is not part of the returned toolchain dicts + assert all(set(tc) == {'name', 'version'} for tcs in result.values() for tc in tcs) -def test_envvar_overrides_location(monkeypatch, tmp_path): - custom = write_json(tmp_path / 'custom.json', {'2099.01': [{'name': 'foo', 'version': '1'}]}) +def test_envvar_overrides_location(monkeypatch, default_dir, tmp_path): + write_json(default_dir / DEFAULT_FILENAME, {'2099.01': [{'name': 'default', 'version': '1'}]}) + custom = write_json(tmp_path / 'custom.json', {'2099.01': [{'name': 'custom', 'version': '1'}]}) monkeypatch.setenv(ENVVAR, custom) - assert eb_hooks.load_supported_top_level_toolchains() == {'2099.01': [{'name': 'foo', 'version': '1'}]} + assert eb_hooks.load_supported_top_level_toolchains() == {'2099.01': [{'name': 'custom', 'version': '1'}]} -def test_envvar_missing_file(monkeypatch, tmp_path): +def test_envvar_missing_file(monkeypatch, default_dir, tmp_path): + default_file = write_json(default_dir / DEFAULT_FILENAME, {'2099.01': []}) missing = str(tmp_path / 'does_not_exist.json') monkeypatch.setenv(ENVVAR, missing) with pytest.raises(EasyBuildError) as excinfo: @@ -86,28 +114,37 @@ def test_envvar_missing_file(monkeypatch, tmp_path): msg = str(excinfo.value) assert missing in msg assert ENVVAR in msg - # the file in the default location exists, so the user should be pointed to it and told how to use it - assert TOOLCHAINS_FILE in msg + # a file exists in the default location, so the user should be pointed to it and told how to use it + assert default_file in msg assert f"unset {ENVVAR}" in msg -def test_missing_default_file(monkeypatch, tmp_path): - monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) +def test_envvar_missing_file_no_default(monkeypatch, default_dir, tmp_path): + missing = str(tmp_path / 'does_not_exist.json') + monkeypatch.setenv(ENVVAR, missing) + with pytest.raises(EasyBuildError) as excinfo: + eb_hooks.load_supported_top_level_toolchains() + msg = str(excinfo.value) + assert missing in msg + assert 'unset' not in msg + + +def test_missing_default_file(default_dir): with pytest.raises(EasyBuildError) as excinfo: eb_hooks.load_supported_top_level_toolchains() msg = str(excinfo.value) - assert str(tmp_path / 'eessi_supported_toolchains.json') in msg + assert str(default_dir / DEFAULT_FILENAME) in msg assert ENVVAR in msg # mentions how to configure the location assert 'unset' not in msg @pytest.mark.parametrize('use_envvar', [False, True]) -def test_invalid_json(monkeypatch, tmp_path, use_envvar): - bad = write_json(tmp_path / 'bad.json', '{"2025.06": [') +def test_invalid_json(monkeypatch, default_dir, tmp_path, use_envvar): if use_envvar: + bad = write_json(tmp_path / 'bad.json', '{"2099.01": [') monkeypatch.setenv(ENVVAR, bad) else: - monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) - os.rename(bad, tmp_path / 'eessi_supported_toolchains.json') - with pytest.raises(EasyBuildError, match='does not contain valid JSON'): + bad = write_json(default_dir / DEFAULT_FILENAME, '{"2099.01": [') + with pytest.raises(EasyBuildError, match='does not contain valid JSON') as excinfo: eb_hooks.load_supported_top_level_toolchains() + assert bad in str(excinfo.value) From 242a8a4aef5931010c00927a08e8c13e41c4e0c5 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 6 Oct 2026 14:39:40 +0200 Subject: [PATCH 09/16] Convert to using TOML instead, so that we can use comments in the file --- .../workflows/test-eb-hooks-toolchains.yml | 4 +- .github/workflows/test-eb-init-files.yml | 2 +- eb_hooks.py | 27 ++++-- eessi_supported_toolchains.json | 18 ---- eessi_supported_toolchains.toml | 25 ++++++ install_scripts.sh | 2 +- tests/eb_hooks/test_supported_toolchains.py | 84 +++++++++++-------- 7 files changed, 98 insertions(+), 64 deletions(-) delete mode 100644 eessi_supported_toolchains.json create mode 100644 eessi_supported_toolchains.toml diff --git a/.github/workflows/test-eb-hooks-toolchains.yml b/.github/workflows/test-eb-hooks-toolchains.yml index 0f481390..2041a3ae 100644 --- a/.github/workflows/test-eb-hooks-toolchains.yml +++ b/.github/workflows/test-eb-hooks-toolchains.yml @@ -4,13 +4,13 @@ on: push: paths: - eb_hooks.py - - eessi_supported_toolchains.json + - eessi_supported_toolchains.toml - tests/eb_hooks/** - .github/workflows/test-eb-hooks-toolchains.yml pull_request: paths: - eb_hooks.py - - eessi_supported_toolchains.json + - eessi_supported_toolchains.toml - tests/eb_hooks/** - .github/workflows/test-eb-hooks-toolchains.yml workflow_dispatch: diff --git a/.github/workflows/test-eb-init-files.yml b/.github/workflows/test-eb-init-files.yml index 546b9d57..c8bd3981 100644 --- a/.github/workflows/test-eb-init-files.yml +++ b/.github/workflows/test-eb-init-files.yml @@ -30,7 +30,7 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: | # Files that are installed in the same directory as the hooks, and have to be up-to-date - FILES=(eb_hooks.py eessi_supported_toolchains.json) + FILES=(eb_hooks.py eessi_supported_toolchains.toml) # Fetch base branch git fetch origin ${{ github.base_ref }} diff --git a/eb_hooks.py b/eb_hooks.py index 0ffc30d1..7125cf51 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -10,6 +10,14 @@ import tarfile from typing import NamedTuple +try: + import tomllib # in the standard library since Python 3.11 +except ImportError: + try: + import tomli as tomllib # backport for older Python versions + except ImportError: + tomllib = None + import easybuild.tools.environment as env from easybuild.easyblocks.generic.configuremake import obtain_config_guess from easybuild.framework.easyconfig.constants import EASYCONFIG_CONSTANTS @@ -67,16 +75,16 @@ STACK_REPROD_SUBDIR = 'reprod' -# Environment variable that can be used to point to a custom JSON file with the supported top-level toolchains +# Environment variable that can be used to point to a custom TOML file with the supported top-level toolchains SUPPORTED_TOOLCHAINS_FILE_ENVVAR = 'EESSI_SUPPORTED_TOOLCHAINS_FILE' def load_supported_top_level_toolchains(): """ - Load the supported top-level toolchains per EESSI version from a JSON file. + Load the supported top-level toolchains per EESSI version from a TOML file. - The location of the JSON file can be set through the environment variable EESSI_SUPPORTED_TOOLCHAINS_FILE. - If that is not set, eessi_supported_toolchains.json is expected next to this hooks file (both in the + The location of the TOML file can be set through the environment variable EESSI_SUPPORTED_TOOLCHAINS_FILE. + If that is not set, eessi_supported_toolchains.toml is expected next to this hooks file (both in the software-layer-scripts repository, and when installed in /init/easybuild). Toolchains that require a more recent EasyBuild version than the one being used (as specified via @@ -86,16 +94,19 @@ def load_supported_top_level_toolchains(): supported_toolchains (dict): maps each EESSI version to a list of dicts with the 'name' and 'version' of a supported top-level toolchain """ - default_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.json') + default_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.toml') toolchains_file = os.getenv(SUPPORTED_TOOLCHAINS_FILE_ENVVAR) envvar_msg = f" (set via ${SUPPORTED_TOOLCHAINS_FILE_ENVVAR})" if not toolchains_file: toolchains_file = default_file envvar_msg = "" + if tomllib is None: + raise EasyBuildError("Parsing TOML files requires Python 3.11 or newer, or the 'tomli' Python package") + try: - with open(toolchains_file) as fh: - toolchains = json.load(fh) + with open(toolchains_file, 'rb') as fh: + toolchains = tomllib.load(fh) except OSError as err: msg = (f"Failed to read the file with supported toolchains {toolchains_file}{envvar_msg}: {err}. " f"By default, it is expected next to the EasyBuild hooks file; its location can be configured " @@ -106,7 +117,7 @@ def load_supported_top_level_toolchains(): raise EasyBuildError(msg) except ValueError as err: raise EasyBuildError(f"The file with supported toolchains {toolchains_file}{envvar_msg} " - f"does not contain valid JSON: {err}") + f"does not contain valid TOML: {err}") return { eessi_version: [ diff --git a/eessi_supported_toolchains.json b/eessi_supported_toolchains.json deleted file mode 100644 index d89d38fe..00000000 --- a/eessi_supported_toolchains.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "2023.06": [ - {"name": "foss", "version": "2022b"}, - {"name": "foss", "version": "2023a"}, - {"name": "foss", "version": "2023b"} - ], - "2025.06": [ - {"name": "foss", "version": "2024a"}, - {"name": "foss", "version": "2025a"}, - {"name": "foss", "version": "2025b"}, - {"name": "lfoss", "version": "2025b", "min_easybuild_version": "5.2.0"}, - {"name": "rompi", "version": "2025a", "min_easybuild_version": "5.3.1"} - ], - "2026.06": [ - {"name": "foss", "version": "2026.1"}, - {"name": "lfoss", "version": "2026.1"} - ] -} diff --git a/eessi_supported_toolchains.toml b/eessi_supported_toolchains.toml new file mode 100644 index 00000000..5aa00d65 --- /dev/null +++ b/eessi_supported_toolchains.toml @@ -0,0 +1,25 @@ +# Top-level toolchains that are supported for installations in each EESSI version. +# This file is read by eb_hooks.py (see load_supported_top_level_toolchains()), and has to be installed next to it. +# +# Each key is an EESSI version, with a list of toolchains ('name' and 'version'). +# An optional 'min_easybuild_version' can be used for toolchains that are only supported when +# a sufficiently recent EasyBuild version is used (e.g. because older versions don't know the toolchain). + +"2023.06" = [ + { name = "foss", version = "2022b" }, + { name = "foss", version = "2023a" }, + { name = "foss", version = "2023b" }, +] + +"2025.06" = [ + { name = "foss", version = "2024a" }, + { name = "foss", version = "2025a" }, + { name = "foss", version = "2025b" }, + { name = "lfoss", version = "2025b", min_easybuild_version = "5.2.0" }, + { name = "rompi", version = "2025a", min_easybuild_version = "5.3.1" }, +] + +"2026.06" = [ + { name = "foss", version = "2026.1" }, + { name = "lfoss", version = "2026.1" }, +] diff --git a/install_scripts.sh b/install_scripts.sh index b4a36383..ae6a854b 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -225,7 +225,7 @@ fi # Copy over EasyBuild hooks file used for installations (and the files it needs, which have to be located next to it) easybuild_init_files=( eb_hooks.py - eessi_supported_toolchains.json + eessi_supported_toolchains.toml ) copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${easybuild_init_files[@]}" diff --git a/tests/eb_hooks/test_supported_toolchains.py b/tests/eb_hooks/test_supported_toolchains.py index 4f0546fc..b0c18ce5 100644 --- a/tests/eb_hooks/test_supported_toolchains.py +++ b/tests/eb_hooks/test_supported_toolchains.py @@ -1,19 +1,23 @@ -# Unit tests for the supported top-level toolchains (eessi_supported_toolchains.json) +# Unit tests for the supported top-level toolchains (eessi_supported_toolchains.toml) # and the function in eb_hooks.py that loads them. # Requires EasyBuild to be importable, e.g.: pip install easybuild pytest -import json import os import sys import pytest +try: + import tomllib +except ImportError: # Python < 3.11 + import tomli as tomllib + REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.insert(0, REPO_ROOT) import eb_hooks # noqa: E402 from easybuild.tools.build_log import EasyBuildError # noqa: E402 -TOOLCHAINS_FILE = os.path.join(REPO_ROOT, 'eessi_supported_toolchains.json') +TOOLCHAINS_FILE = os.path.join(REPO_ROOT, 'eessi_supported_toolchains.toml') ENVVAR = 'EESSI_SUPPORTED_TOOLCHAINS_FILE' @@ -22,15 +26,15 @@ def clean_env(monkeypatch): monkeypatch.delenv(ENVVAR, raising=False) -def write_json(path, content): - path.write_text(content if isinstance(content, str) else json.dumps(content)) +def write_file(path, content): + path.write_text(content) return str(path) -def test_json_format(): - """Check that the shipped JSON file has the expected structure.""" - with open(TOOLCHAINS_FILE) as fh: - data = json.load(fh) +def test_toml_format(): + """Check that the shipped TOML file has the expected structure.""" + with open(TOOLCHAINS_FILE, 'rb') as fh: + data = tomllib.load(fh) assert isinstance(data, dict) and data for eessi_version, toolchains in data.items(): @@ -47,22 +51,26 @@ def test_json_format(): assert len(pairs) == len(set(pairs)), f"Duplicate toolchains for {eessi_version}" -DEFAULT_FILENAME = 'eessi_supported_toolchains.json' +DEFAULT_FILENAME = 'eessi_supported_toolchains.toml' @pytest.fixture def default_dir(monkeypatch, tmp_path): - """Make the 'directory of eb_hooks.py' (i.e. the default location of the JSON file) an empty temporary dir.""" + """Make the 'directory of eb_hooks.py' (i.e. the default location of the TOML file) an empty temporary dir.""" monkeypatch.setattr(eb_hooks, '__file__', str(tmp_path / 'eb_hooks.py')) return tmp_path def test_load_default_location(default_dir): """Without the environment variable, the file next to eb_hooks.py is used.""" - write_json(default_dir / DEFAULT_FILENAME, { - '2099.01': [{'name': 'foo', 'version': '1'}, {'name': 'bar', 'version': '2'}], - '2099.02': [{'name': 'baz', 'version': '3'}], - }) + write_file(default_dir / DEFAULT_FILENAME, ''' + "2099.01" = [ + # comments are the reason for using TOML + { name = "foo", version = "1" }, + { name = "bar", version = "2" }, + ] + "2099.02" = [{ name = "baz", version = "3" }] + ''') assert eb_hooks.load_supported_top_level_toolchains() == { '2099.01': [{'name': 'foo', 'version': '1'}, {'name': 'bar', 'version': '2'}], '2099.02': [{'name': 'baz', 'version': '3'}], @@ -79,16 +87,16 @@ def test_load_default_location(default_dir): ]) def test_min_easybuild_version(monkeypatch, default_dir, eb_version, expected): """Toolchains with a 'min_easybuild_version' are only included for that EasyBuild version or newer.""" - write_json(default_dir / DEFAULT_FILENAME, { - '2099.01': [ - {'name': 'always', 'version': '1'}, - {'name': 'since_5_2_0', 'version': '1', 'min_easybuild_version': '5.2.0'}, - {'name': 'since_5_3_1', 'version': '1', 'min_easybuild_version': '5.3.1'}, - ], - '2099.02': [ - {'name': 'only_future', 'version': '1', 'min_easybuild_version': '99.0.0'}, - ], - }) + write_file(default_dir / DEFAULT_FILENAME, ''' + "2099.01" = [ + { name = "always", version = "1" }, + { name = "since_5_2_0", version = "1", min_easybuild_version = "5.2.0" }, + { name = "since_5_3_1", version = "1", min_easybuild_version = "5.3.1" }, + ] + "2099.02" = [ + { name = "only_future", version = "1", min_easybuild_version = "99.0.0" }, + ] + ''') monkeypatch.setattr(eb_hooks, 'EASYBUILD_VERSION', eb_version) result = eb_hooks.load_supported_top_level_toolchains() assert [tc['name'] for tc in result['2099.01']] == expected @@ -99,15 +107,15 @@ def test_min_easybuild_version(monkeypatch, default_dir, eb_version, expected): def test_envvar_overrides_location(monkeypatch, default_dir, tmp_path): - write_json(default_dir / DEFAULT_FILENAME, {'2099.01': [{'name': 'default', 'version': '1'}]}) - custom = write_json(tmp_path / 'custom.json', {'2099.01': [{'name': 'custom', 'version': '1'}]}) + write_file(default_dir / DEFAULT_FILENAME, '"2099.01" = [{ name = "default", version = "1" }]') + custom = write_file(tmp_path / 'custom.toml', '"2099.01" = [{ name = "custom", version = "1" }]') monkeypatch.setenv(ENVVAR, custom) assert eb_hooks.load_supported_top_level_toolchains() == {'2099.01': [{'name': 'custom', 'version': '1'}]} def test_envvar_missing_file(monkeypatch, default_dir, tmp_path): - default_file = write_json(default_dir / DEFAULT_FILENAME, {'2099.01': []}) - missing = str(tmp_path / 'does_not_exist.json') + default_file = write_file(default_dir / DEFAULT_FILENAME, '"2099.01" = []') + missing = str(tmp_path / 'does_not_exist.toml') monkeypatch.setenv(ENVVAR, missing) with pytest.raises(EasyBuildError) as excinfo: eb_hooks.load_supported_top_level_toolchains() @@ -120,7 +128,7 @@ def test_envvar_missing_file(monkeypatch, default_dir, tmp_path): def test_envvar_missing_file_no_default(monkeypatch, default_dir, tmp_path): - missing = str(tmp_path / 'does_not_exist.json') + missing = str(tmp_path / 'does_not_exist.toml') monkeypatch.setenv(ENVVAR, missing) with pytest.raises(EasyBuildError) as excinfo: eb_hooks.load_supported_top_level_toolchains() @@ -139,12 +147,20 @@ def test_missing_default_file(default_dir): @pytest.mark.parametrize('use_envvar', [False, True]) -def test_invalid_json(monkeypatch, default_dir, tmp_path, use_envvar): +def test_invalid_toml(monkeypatch, default_dir, tmp_path, use_envvar): if use_envvar: - bad = write_json(tmp_path / 'bad.json', '{"2099.01": [') + bad = write_file(tmp_path / 'bad.toml', '"2099.01" = [') monkeypatch.setenv(ENVVAR, bad) else: - bad = write_json(default_dir / DEFAULT_FILENAME, '{"2099.01": [') - with pytest.raises(EasyBuildError, match='does not contain valid JSON') as excinfo: + bad = write_file(default_dir / DEFAULT_FILENAME, '"2099.01" = [') + with pytest.raises(EasyBuildError, match='does not contain valid TOML') as excinfo: eb_hooks.load_supported_top_level_toolchains() assert bad in str(excinfo.value) + + +def test_no_toml_support(monkeypatch, default_dir): + """A clear error is raised if there is no TOML parser available (Python < 3.11 without tomli).""" + write_file(default_dir / DEFAULT_FILENAME, '"2099.01" = []') + monkeypatch.setattr(eb_hooks, 'tomllib', None) + with pytest.raises(EasyBuildError, match='tomli'): + eb_hooks.load_supported_top_level_toolchains() From 754ae62d987d846e260d893f9ff18104e5fcc719 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 6 Oct 2026 14:44:47 +0200 Subject: [PATCH 10/16] Add comment on how to convert to json, if needed --- eessi_supported_toolchains.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eessi_supported_toolchains.toml b/eessi_supported_toolchains.toml index 5aa00d65..f3734119 100644 --- a/eessi_supported_toolchains.toml +++ b/eessi_supported_toolchains.toml @@ -5,6 +5,9 @@ # An optional 'min_easybuild_version' can be used for toolchains that are only supported when # a sufficiently recent EasyBuild version is used (e.g. because older versions don't know the toolchain). +# If you need to use this from a shell and don't have yq available, you can convert it to json on the fly using +# python -c "import tomllib, json; print(json.dumps(tomllib.load(open('input.toml','rb')), indent=2))" > output.json + "2023.06" = [ { name = "foss", version = "2022b" }, { name = "foss", version = "2023a" }, From 32eee0f1eab61bbb919bd461f690d9f66a3979f6 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 6 Oct 2026 14:53:11 +0200 Subject: [PATCH 11/16] Read supported toolchains from the TOML file eessi_supported_toolchains.json was converted to TOML in separate-supported-toolchains, so parse that instead. Like eb_hooks.py, respect $EESSI_SUPPORTED_TOOLCHAINS_FILE if set. Co-Authored-By: Claude Sonnet 5.5 --- scripts/native_flags/check_native_flags.sh | 4 +++- .../native_flags/get_supported_toolchains.py | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/scripts/native_flags/check_native_flags.sh b/scripts/native_flags/check_native_flags.sh index 6aee55b4..f966671a 100755 --- a/scripts/native_flags/check_native_flags.sh +++ b/scripts/native_flags/check_native_flags.sh @@ -119,7 +119,9 @@ function provided_by_module() { echo ">> Checking native compiler flags for CPU target ${EESSI_SOFTWARE_SUBDIR} (EESSI ${EESSI_VERSION})" echo ">> Native architecture flag: ${native_flag}" -toolchains=$(python3 ${SCRIPT_DIR}/get_supported_toolchains.py ${TOPDIR}/eessi_supported_toolchains.json ${EESSI_VERSION}) +# use the same file as eb_hooks.py (which can be configured through $EESSI_SUPPORTED_TOOLCHAINS_FILE) +supported_toolchains_file=${EESSI_SUPPORTED_TOOLCHAINS_FILE:-${TOPDIR}/eessi_supported_toolchains.toml} +toolchains=$(python3 ${SCRIPT_DIR}/get_supported_toolchains.py ${supported_toolchains_file} ${EESSI_VERSION}) check_exit_code $? ">> Supported toolchains in EESSI ${EESSI_VERSION}: $(echo ${toolchains})" \ "Failed to determine supported toolchains for EESSI ${EESSI_VERSION}" diff --git a/scripts/native_flags/get_supported_toolchains.py b/scripts/native_flags/get_supported_toolchains.py index c34f0cf7..10239e20 100755 --- a/scripts/native_flags/get_supported_toolchains.py +++ b/scripts/native_flags/get_supported_toolchains.py @@ -2,23 +2,32 @@ # # Print the top-level toolchains supported in a given EESSI version, one 'name/version' per line. # -# The list is read from eessi_supported_toolchains.json, which is also used by eb_hooks.py. +# The list is read from eessi_supported_toolchains.toml, which is also used by eb_hooks.py. # Toolchains are included regardless of their 'min_easybuild_version' (that only determines whether the # EasyBuild version being used can install that toolchain, which is irrelevant for determining which compilers are # part of an EESSI version). # Site-specific toplevel toolchains defined via $EESSI_SITE_TOP_LEVEL_TOOLCHAINS_ are included as well, # in the same way as is done in eb_hooks.py. # -# usage: get_supported_toolchains.py +# usage: get_supported_toolchains.py import json import os import sys +try: + import tomllib # in the standard library since Python 3.11 +except ImportError: + try: + import tomli as tomllib # backport for older Python versions + except ImportError: + sys.stderr.write("ERROR: parsing TOML files requires Python 3.11 or newer, or the 'tomli' Python package\n") + sys.exit(1) + def get_toolchains(toolchains_file, eessi_version): - with open(toolchains_file) as fh: - toolchains = json.load(fh) + with open(toolchains_file, 'rb') as fh: + toolchains = tomllib.load(fh) if eessi_version not in toolchains: sys.stderr.write(f"ERROR: no supported toolchains defined for EESSI version {eessi_version} " @@ -36,7 +45,7 @@ def get_toolchains(toolchains_file, eessi_version): def main(): if len(sys.argv) != 3: - sys.stderr.write(f"usage: {sys.argv[0]} \n") + sys.stderr.write(f"usage: {sys.argv[0]} \n") sys.exit(1) seen = set() From 9830ca5713a9d92ce4699e37600357fbec29bd7f Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sat, 10 Oct 2026 14:15:25 -0500 Subject: [PATCH 12/16] Audit the instructions in each build tarball against its CPU target The native flags check runs before a build. Add the matching check after the build: every instruction in the tarball has to be one the target can run, against the same per-target references. scripts/isa_audit/check_tarball.sh extracts the tarball and picks the newest GCC reference for the target. x86_64 files are decoded with iced-x86, and an instruction fails when it needs a feature the reference marks -mno-X. aarch64 files are disassembled with llvm-objdump twice, with all features and with the reference's features, and an instruction that decodes only in the first fails. dispatch-allow.txt lists packages that pick their instruction set at run time, and those are reported as DISPATCH. A violation prints an ERROR line, which check-build.sh reports as a failed build. Generic targets, targets without a reference and hosts without iced-x86 or llvm-objdump are skipped with a message, and EESSI_SKIP_ISA_AUDIT skips the audit. bot/build.sh runs it after create_tarball.sh. --- bot/build.sh | 8 ++ scripts/isa_audit/check_tarball.sh | 56 ++++++++ scripts/isa_audit/dispatch-allow.txt | 25 ++++ scripts/isa_audit/isa_audit.py | 192 +++++++++++++++++++++++++ scripts/isa_audit/isa_audit_aarch64.py | 134 +++++++++++++++++ 5 files changed, 415 insertions(+) create mode 100755 scripts/isa_audit/check_tarball.sh create mode 100644 scripts/isa_audit/dispatch-allow.txt create mode 100644 scripts/isa_audit/isa_audit.py create mode 100644 scripts/isa_audit/isa_audit_aarch64.py diff --git a/bot/build.sh b/bot/build.sh index a60054fe..b9ef8ac6 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -379,4 +379,12 @@ echo " -- $software_layer_dir/create_tarball.sh ${TMP_IN_CON $software_layer_dir/eessi_container.sh "${COMMON_ARGS[@]}" "${TARBALL_STEP_ARGS[@]}" \ -- $software_layer_dir/create_tarball.sh ${TMP_IN_CONTAINER} ${EESSI_VERSIONS_SUBPATH} ${EESSI_VERSION}${EESSI_SOFTWARE_LAYER_VERSION_SUFFIX} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} "$tarball_accelerators" /eessi_bot_job/${TARBALL} 2>&1 | tee -a ${tar_outerr} +# check that every instruction in the tarball is one the CPU target can run, against the same per-target +# references as the native compiler flags check; a violation prints an 'ERROR: ' line, which check-build.sh reports +if [[ -f ${TARBALL} ]]; then + $software_layer_dir/scripts/isa_audit/check_tarball.sh ${TARBALL} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} \ + $software_layer_dir/scripts/native_flags/references $software_layer_dir/scripts/isa_audit/dispatch-allow.txt \ + 2>&1 | tee -a ${tar_outerr} +fi + exit 0 diff --git a/scripts/isa_audit/check_tarball.sh b/scripts/isa_audit/check_tarball.sh new file mode 100755 index 00000000..e5cd20a4 --- /dev/null +++ b/scripts/isa_audit/check_tarball.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# Audit the instructions in an EESSI build tarball against its CPU target. +# +# check_tarball.sh TARBALL EESSI_SOFTWARE_SUBDIR REFERENCE_DIR [ALLOW_FILE] +# +# REFERENCE_DIR is the per-target reference directory of +# software-layer-scripts#311 (scripts/native_flags/references); the newest gcc +# reference for the target is used. x86_64 targets are audited with +# isa_audit.py (iced-x86), aarch64 targets with isa_audit_aarch64.py +# (llvm-objdump). Generic targets are skipped. A violation prints an "ERROR:" +# line, which bot/check-build.sh already reports as a failed build. +set -uo pipefail +tarball=$1 subdir=$2 refdir=$3 allow=${4:-} +here=$(dirname "$(readlink -f "$0")") +if [ -n "${EESSI_SKIP_ISA_AUDIT:-}" ]; then + echo ">> instruction audit: skipped, \$EESSI_SKIP_ISA_AUDIT is set"; exit 0 +fi +case $subdir in + */generic) echo ">> instruction audit: skipped for $subdir"; exit 0 ;; +esac +case ${subdir%%/*} in + x86_64) + if ! python3 -c 'import iced_x86, elftools' 2>/dev/null; then + echo ">> instruction audit: skipped, python3 cannot import iced_x86 and elftools (pip install iced-x86 pyelftools)" + exit 0 + fi ;; + aarch64) + if ! command -v llvm-objdump >/dev/null; then + echo ">> instruction audit: skipped, llvm-objdump (LLVM 20 or later) is not on \$PATH" + exit 0 + fi ;; +esac +ref=$(ls "$refdir/$subdir"/gcc-*.txt 2>/dev/null | sort -V | tail -1) +if [ -z "$ref" ]; then + [ "${subdir%%/*}" = aarch64 ] && ref=$(ls "$refdir/$subdir"/clang-*.txt 2>/dev/null | sort -V | tail -1) +fi +if [ -z "$ref" ]; then + echo ">> instruction audit: no reference for $subdir under $refdir; skipped" + exit 0 +fi +work=$(mktemp -d) +# installations are read-only (EASYBUILD_READ_ONLY_INSTALLDIR), so make them writable before removing them +trap 'chmod -R u+w "$work" 2>/dev/null; rm -rf "$work"' EXIT +tar -xf "$tarball" -C "$work" || { echo "ERROR: instruction audit: cannot unpack $tarball"; exit 1; } +case ${subdir%%/*} in + x86_64) out=$(python3 "$here/isa_audit.py" ${allow:+--allow "$allow"} "$ref" "$work") ;; + aarch64) out=$(python3 "$here/isa_audit_aarch64.py" "$ref" "$work") ;; + *) echo ">> instruction audit: no auditor for ${subdir%%/*}"; exit 0 ;; +esac +rc=$? +echo "$out" | grep -E "^(audited|DISPATCH|VIOLATION|RESULT)" | sed 's/^/>> instruction audit: /' +if [ $rc -ne 0 ]; then + echo "ERROR: instruction audit: $(echo "$out" | grep -c '^VIOLATION') violation(s) (feature, file) beyond $subdir ($(basename "$ref"))" + exit 1 +fi +echo ">> instruction audit: pass against $(basename "$ref")" diff --git a/scripts/isa_audit/dispatch-allow.txt b/scripts/isa_audit/dispatch-allow.txt new file mode 100644 index 00000000..a255e767 --- /dev/null +++ b/scripts/isa_audit/dispatch-allow.txt @@ -0,0 +1,25 @@ +# Packages whose binaries carry instructions beyond the target in code chosen +# at run time by a CPUID check. Seeded from the 2025.06 intel/icelake baseline; +# each line: package, features, mechanism. +FFmpeg fma4,xop # hand-written assembly, av_get_cpu_flags dispatch +x264 fma4,xop # hand-written assembly, x264_cpu_detect dispatch +OpenSSL rtm,xop # OPENSSL_ia32cap dispatch +GnuTLS xop # bundled crypto assembly with CPU dispatch +tbb rtm,waitpkg # speculative locks and tpause behind cpuid checks +OSPRay rtm,waitpkg # bundled libtbb +Salmon rtm,waitpkg # bundled libtbb +R-bundle-CRAN rtm # RcppParallel bundled libtbb +IQ-TREE rtm,waitpkg # bundled tbb +LLVM rtm,waitpkg # libomp lock and wait paths behind cpuid checks +libfabric enqcmd,movdir64b # DSA provider, used only when the device exists +SciPy-bundle avx512fp16 # NumPy NPY_CPU_DISPATCH kernels +imkl amxbf16,amxfp16,amxint8,amxtile,avx512bf16,avx512fp16,avxvnni,fma4,rtm,waitpkg # per-CPU code paths +ollama avxvnni # per-architecture ggml-cpu libraries chosen at load +Julia amxbf16,amxtile,avx512bf16,fma4,shstk,xop # bundled libraries with dispatch +Java serialize # JIT and runtime stubs behind CPU checks +Qt6 xop # WebEngine (Chromium) bundled code with dispatch +RStudio-Server cldemote,rtm,xop # bundled node, pandoc, typst +Pandoc rtm,xop # statically linked runtime with dispatch +GCCcore fma4,rtm # libgfortran matmul variants chosen at run time (fma4); libitm hardware transactions behind cpuid (rtm) +# Not confirmed as dispatch; may be linear-sweep decoding of data in .text: +Rust fma4 # bin/rust-analyzer, 2 sites (vfmaddsd) diff --git a/scripts/isa_audit/isa_audit.py b/scripts/isa_audit/isa_audit.py new file mode 100644 index 00000000..1f649bad --- /dev/null +++ b/scripts/isa_audit/isa_audit.py @@ -0,0 +1,192 @@ +"""Audit x86-64 ELF files against a CPU target's recorded compiler flags. + +The target is described by the flags GCC resolved -march=native into on that +hardware, one per line, as in software-layer-scripts#311's references: +``-mX`` for an extension the target has and ``-mno-X`` for one it lacks. +Every executable section of every ELF file is decoded with iced-x86, and each +instruction's CPUID features are compared with that list. An instruction +whose feature the target lacks is a violation; a feature the list does not +mention is reported as unclassified, never passed silently. + + python isa_audit.py [--allow FILE] REFERENCE[,REFERENCE...] PATH [PATH ...] + +Several comma-separated references are checked in one decoding pass. PATH may +be a file or a directory; a directory is walked for regular files that are +executable or named like a shared object, the only files read. The exit +status is 1 when there is any violation against the first reference. + +--allow FILE lists code that selects its instruction set at run time, one +"PACKAGE feature[,feature...] # reason" per line. A violation in a file under +/software/PACKAGE/ on a listed feature is reported as DISPATCH, not counted as +a failure; the dynamic chip check (SDE) covers what actually runs. +""" +import collections +import os +import sys + +from elftools.common.exceptions import ELFError +from elftools.elf.constants import SH_FLAGS +from elftools.elf.elffile import ELFFile +from iced_x86 import CpuidFeature, Decoder, DecoderOptions, Mnemonic + +#: iced feature name (normalised) -> GCC -m name, where they differ +ALIASES = { + "bmi1": "bmi", + "cetss": "shstk", + "monitorx": "mwaitx", + "pclmulqdq": "pclmul", + "prefetchw": "prfchw", + "prefetchiti": "prefetchi", + "aeskle": "kl", + "aeskle256": "widekl", + "amxfp16": "amx-fp16", + "rdrand": "rdrnd", + "d3now": "3dnow", + "fma": "fma", +} + +#: features of the x86-64 baseline and of instructions every x86-64 compiler +#: may emit without an -m flag; they are never violations +BASELINE = { + "intel8086", "intel8086only", "intel186", "intel286", "intel286only", + "intel386", "intel386only", "intel486", "intel486a", "x64", "fpu", + "fpu287", "fpu387", "cmov", "cx8", "mmx", "sse", "sse2", "pause", + "multibytenop", "syscall", "rdtsc", "rdtscp", "cpuid", "cx16", "lahfsahf", + "lahf_sahf", "sahf", "fxsr", "clfsh", "nop", "tsc", "msr", "sysenter", + "smm", "invpcid", + # ENDBR32/64: CET indirect-branch hints, a NOP on every x86-64 CPU + "cetibt", + # performance-counter read, no -m option; allowed by the kernel or not + "rdpmc", +} + + +#: shadow-stack instructions that are safe without CET: RDSSP runs as a NOP +#: (reserved-NOP space), and the unwinder runs INCSSP only after RDSSP +#: returned a non-zero shadow-stack pointer +CET_UNWIND = {Mnemonic.RDSSPD, Mnemonic.RDSSPQ, Mnemonic.INCSSPD, Mnemonic.INCSSPQ} + + +def norm(name: str) -> str: + return name.lower().replace("_", "").replace("-", "").replace(".", "") + + +def feature_names() -> dict: + return {getattr(CpuidFeature, k): k for k in dir(CpuidFeature) + if not k.startswith("_") and isinstance(getattr(CpuidFeature, k), int)} + + +def load_reference(path: str): + have, lack = set(), set() + for line in open(path): + tok = line.strip() + if not tok.startswith("-m") or tok.startswith(("-march=", "-mtune=", "-mabi")): + continue + if tok.startswith("-mno-"): + lack.add(norm(tok[5:])) + else: + have.add(norm(tok[2:])) + return have, lack + + +def elf_files(paths): + for p in paths: + if os.path.isdir(p): + for root, _, files in os.walk(p): + for f in files: + full = os.path.join(root, f) + if os.path.islink(full) or not os.path.isfile(full): + continue + if ".so" in f or os.access(full, os.X_OK): + yield full + else: + yield p + + +def audit_file(path, refs, names, viol, unclassified, counts): + """Decode every executable section once; check each reference.""" + try: + with open(path, "rb") as fh: + if fh.read(4) != b"\x7fELF": + return False + fh.seek(0) + elf = ELFFile(fh) + if elf["e_machine"] != "EM_X86_64": + return False + for sec in elf.iter_sections(): + if not sec["sh_flags"] & SH_FLAGS.SHF_EXECINSTR or sec["sh_type"] == "SHT_NOBITS": + continue + dec = Decoder(64, sec.data(), DecoderOptions.NONE, ip=sec["sh_addr"]) + for ins in dec: + counts["instructions"] += 1 + for f in ins.cpuid_features(): + n = norm(names.get(f, str(f))) + n = norm(ALIASES.get(n, n)) + if n in BASELINE or (n == "shstk" and ins.mnemonic in CET_UNWIND): + continue + for r, (have, lack) in enumerate(refs): + if n in have: + continue + if n in lack: + viol[r].setdefault((n, path), (ins.ip, f"{ins}")) + counts[(r, n)] += 1 + else: + unclassified[r][n] += 1 + except (ELFError, OSError, ValueError): + return False + return True + + +def load_allow(path): + allow = {} + for line in open(path): + line = line.split("#", 1)[0].split() + if len(line) >= 2: + allow[line[0]] = {norm(f) for f in line[1].split(",") if f} + return allow + + +def allowed(path, feat, allow): + for pkg, feats in allow.items(): + if f"/software/{pkg}/" in path and feat in feats: + return True + return False + + +def main(argv): + allow = {} + if argv[:1] == ["--allow"]: + allow = load_allow(argv[1]) + argv = argv[2:] + if len(argv) < 2: + print(__doc__) + return 2 + ref_paths = argv[0].split(",") + refs = [load_reference(p) for p in ref_paths] + names = feature_names() + viol = [dict() for _ in refs] + unclassified = [collections.Counter() for _ in refs] + counts = collections.Counter() + nfiles = 0 + for f in elf_files(argv[1:]): + if audit_file(f, refs, names, viol, unclassified, counts): + nfiles += 1 + print(f"audited {nfiles} x86-64 ELF files, {counts['instructions']} instructions") + for r, path in enumerate(ref_paths): + have, lack = refs[r] + print(f"reference {path}: {len(have)} extensions present, {len(lack)} absent") + real = {} + for (feat, fpath), (ip, text) in sorted(viol[r].items()): + kind = "DISPATCH" if allowed(fpath, feat, allow) else "VIOLATION" + if kind == "VIOLATION": + real[(feat, fpath)] = 1 + print(f"{kind}[{r}] {feat} x{counts[(r, feat)]} first in {fpath} at {ip:#x}: {text}") + viol[r] = real + for feat, n in unclassified[r].most_common(): + print(f"unclassified[{r}] {feat} x{n}") + print(f"RESULT[{r}]", "fail" if viol[r] else "pass") + return 1 if viol[0] else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/scripts/isa_audit/isa_audit_aarch64.py b/scripts/isa_audit/isa_audit_aarch64.py new file mode 100644 index 00000000..7fd65218 --- /dev/null +++ b/scripts/isa_audit/isa_audit_aarch64.py @@ -0,0 +1,134 @@ +"""Audit aarch64 ELF files against a CPU target with llvm-objdump. + +Each file is disassembled twice: once with every feature llvm-objdump knows +(its default for AArch64), and once restricted to the target. An instruction +that decodes in the first and shows as in the second needs a feature +the target lacks: a violation. + +The target comes from a software-layer-scripts#311 reference, in either form: + clang: "-target-cpu X" and "-target-feature +f" lines + gcc: one "-mcpu=X+f+nof..." line + + python isa_audit_aarch64.py REFERENCE PATH [PATH ...] + +llvm-objdump must be on PATH (LLVM 20 or later). Exit status 1 on violation. +""" +import collections +import os +import re +import subprocess +import sys + +#: GCC extension name -> LLVM feature name, where they differ +GCC_TO_LLVM = { + "rng": "rand", + "crypto": "crypto", + "sve2-aes": "sve-aes", + "sve2-sha3": "sve-sha3", + "sve2-sm4": "sve-sm4", + "sve2-bitperm": "sve-bitperm", + "memtag": "mte", + "profile": "spe", + "fp16": "fullfp16", +} + +LINE = re.compile(r"^\s*([0-9a-f]+):\s+[0-9a-f]{8}\s+(\S+)\s*(.*)$") + +#: clang -target-feature entries that are code-generation options, not ISA +NOT_ISA = {"outline-atomics", "fmv"} + + +def target_args(path): + cpu, feats = None, [] + for raw in open(path): + tok = raw.strip() + if tok.startswith("-target-cpu "): + cpu = tok.split()[1] + elif tok.startswith("-target-feature "): + f = tok.split()[1] + if f[1:] not in NOT_ISA: + feats.append(f) + elif tok.startswith("-mcpu="): + parts = tok[len("-mcpu="):].split("+") + cpu = parts[0] + for p in parts[1:]: + if p.startswith("no"): + feats.append("-" + GCC_TO_LLVM.get(p[2:], p[2:])) + else: + feats.append("+" + GCC_TO_LLVM.get(p, p)) + if cpu is None: + raise SystemExit(f"{path}: no -target-cpu or -mcpu= line") + # GCC's internal core names for some parts + cpu = {"zeus": "neoverse-v1", "ares": "neoverse-n1"}.get(cpu, cpu) + args = [f"--mcpu={cpu}"] + if feats: + args.append("--mattr=" + ",".join(feats)) + return args + + +def disassemble(path, extra): + out = subprocess.run(["llvm-objdump", "-d"] + extra + [path], + capture_output=True, text=True) + insns = {} + for line in out.stdout.splitlines(): + m = LINE.match(line) + if m: + insns[m.group(1)] = (m.group(2), m.group(3).strip()) + return insns + + +def is_aarch64_elf(path): + try: + with open(path, "rb") as fh: + head = fh.read(20) + except OSError: + return False + return head[:4] == b"\x7fELF" and head[18:20] == b"\xb7\x00" + + +def files(paths): + for p in paths: + if os.path.isdir(p): + for root, _, names in os.walk(p): + for n in names: + full = os.path.join(root, n) + if os.path.islink(full) or not os.path.isfile(full): + continue + if ".so" in n or os.access(full, os.X_OK): + yield full + else: + yield p + + +def main(argv): + if len(argv) < 2: + print(__doc__) + return 2 + restrict = target_args(argv[0]) + viol, first = collections.Counter(), {} + nfiles = ninsn = 0 + for f in files(argv[1:]): + if not is_aarch64_elf(f): + continue + full = disassemble(f, []) + narrow = disassemble(f, restrict) + nfiles += 1 + ninsn += len(full) + for addr, (mn, ops) in full.items(): + if mn == "": + continue + if narrow.get(addr, ("", ""))[0] == "": + viol[mn] += 1 + first.setdefault(mn, (f, addr, ops)) + print(f"target {' '.join(restrict)}") + print(f"audited {nfiles} aarch64 ELF files, {ninsn} instructions") + for mn, n in viol.most_common(15): + f, addr, ops = first[mn] + print(f"VIOLATION {mn} x{n} first in {f} at 0x{addr}: {mn} {ops}") + print(f"violations {sum(viol.values())} in {len(viol)} mnemonics") + print("RESULT", "fail" if viol else "pass") + return 1 if viol else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) From 17e89ce0d31c7eda9f3753c2bb399152d8ed2b76 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Oct 2026 07:44:14 -0500 Subject: [PATCH 13/16] Add tests for the tarball instruction audit tests/isa_audit/test_check_tarball.sh compiles one loop into a shared library, packs it the way create_tarball.sh lays out a tarball, and runs check_tarball.sh on it. Built with -march=skylake-avx512 and checked against haswell, it has to fail with an avx512f VIOLATION, and pass as DISPATCH once an allow file lists the package. Built for haswell, it has to pass against haswell. The aarch64 cases build with SVE and check it against neoverse_n1 (fail) and neoverse_v1 (pass). The rest cover the generic skip, a target without a reference, EESSI_SKIP_ISA_AUDIT and a missing tarball. The workflow installs gcc, the aarch64 cross compiler, LLVM 20, iced-x86 and pyelftools, and runs the script when the audit, the references or the tests change. --- .github/workflows/tests_isa_audit.yml | 36 +++++++++++++ tests/isa_audit/test_check_tarball.sh | 77 +++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 .github/workflows/tests_isa_audit.yml create mode 100755 tests/isa_audit/test_check_tarball.sh diff --git a/.github/workflows/tests_isa_audit.yml b/.github/workflows/tests_isa_audit.yml new file mode 100644 index 00000000..9c3a579a --- /dev/null +++ b/.github/workflows/tests_isa_audit.yml @@ -0,0 +1,36 @@ +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: Tests for the tarball instruction audit +on: + push: + paths: + - scripts/isa_audit/** + - tests/isa_audit/** + - .github/workflows/tests_isa_audit.yml + pull_request: + paths: + - scripts/isa_audit/** + - scripts/native_flags/references/** + - tests/isa_audit/** + - .github/workflows/tests_isa_audit.yml +permissions: + contents: read # to fetch code (actions/checkout) +jobs: + test: + runs-on: ubuntu-24.04 + steps: + - name: checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: install compilers and decoders + run: | + sudo apt-get update + sudo apt-get install -y gcc gcc-aarch64-linux-gnu llvm-20 + # isa_audit_aarch64.py uses the LLVM 20 feature names (sve-aes and friends) + echo /usr/lib/llvm-20/bin >> "$GITHUB_PATH" + python3 -m venv "$RUNNER_TEMP/venv" + "$RUNNER_TEMP/venv/bin/pip" install iced-x86 pyelftools + echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH" + + - name: test check_tarball.sh + run: | + ./tests/isa_audit/test_check_tarball.sh diff --git a/tests/isa_audit/test_check_tarball.sh b/tests/isa_audit/test_check_tarball.sh new file mode 100755 index 00000000..e63124b6 --- /dev/null +++ b/tests/isa_audit/test_check_tarball.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# Tests for scripts/isa_audit/check_tarball.sh on small tarballs built here. +# Needs gcc, python3 with iced-x86 and pyelftools; the aarch64 cases also need +# aarch64-linux-gnu-gcc and llvm-objdump, and are skipped without them. +set -uo pipefail +top=$(cd "$(dirname "$0")/../.." && pwd) +check=$top/scripts/isa_audit/check_tarball.sh +refs=$top/scripts/native_flags/references +work=$(mktemp -d) +trap 'rm -rf "$work"' EXIT +fails=0 + +# build TARGET PACKAGE CC CFLAGS: compile a shared library with one loop into a tarball +build() { + local target=$1 pkg=$2 cc=$3 cflags=$4 + local dir=$work/root/$target/software/$pkg/1.0/lib + rm -rf "$work/root" && mkdir -p "$dir" + printf 'void axpy(int n, double a, const double *x, double *y)\n{ for (int i = 0; i < n; i++) y[i] += a * x[i]; }\n' > "$work/axpy.c" + # shellcheck disable=SC2086 # CFLAGS holds several flags + $cc -O3 -shared -fPIC $cflags -o "$dir/libaxpy.so" "$work/axpy.c" || return 1 + tar -C "$work/root" -cf "$work/$pkg.tar" "$target" +} + +# expect NAME STATUS PATTERN COMMAND...: run COMMAND, check exit status and output +expect() { + local name=$1 want=$2 pattern=$3; shift 3 + local out rc + out=$("$@" 2>&1); rc=$? + if [ "$rc" -eq "$want" ] && grep -Eq -- "$pattern" <<< "$out"; then + echo "PASS $name" + else + echo "FAIL $name (exit $rc, wanted $want, pattern '$pattern')"; echo "$out" | sed 's/^/ /' + fails=$((fails + 1)) + fi +} + +if python3 -c 'import iced_x86, elftools' 2>/dev/null; then + allow=$work/allow.txt + echo 'Axpy avx512f,avx512vl,avx512dq,avx512bw,avx2,avx,fma # test' > "$allow" + build x86_64/intel/haswell Axpy gcc '-march=skylake-avx512 -mprefer-vector-width=512' + expect x86-violation 1 '^ERROR: instruction audit: [1-9][0-9]* violation' \ + "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" + expect x86-violation-feature 1 'VIOLATION\[0\] avx512f ' \ + "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" + expect x86-dispatch-allowed 0 'DISPATCH\[0\] avx512f ' \ + "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" "$allow" + expect x86-same-target 0 'pass against gcc-' \ + "$check" "$work/Axpy.tar" x86_64/intel/skylake_avx512 "$refs" + build x86_64/intel/haswell Axpy gcc '-march=haswell' + expect x86-native-pass 0 'pass against gcc-' \ + "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" +else + echo "SKIP x86_64 cases: python3 cannot import iced_x86 and elftools" +fi + +if command -v aarch64-linux-gnu-gcc >/dev/null && command -v llvm-objdump >/dev/null; then + build aarch64/neoverse_n1 Axpy aarch64-linux-gnu-gcc '-march=armv8.2-a+sve' + expect aarch64-sve-violation 1 '^ERROR: instruction audit: ' \ + "$check" "$work/Axpy.tar" aarch64/neoverse_n1 "$refs" + expect aarch64-same-target 0 'pass against gcc-' \ + "$check" "$work/Axpy.tar" aarch64/neoverse_v1 "$refs" +else + echo "SKIP aarch64 cases: aarch64-linux-gnu-gcc or llvm-objdump not found" +fi + +build x86_64/intel/haswell Axpy gcc '-march=skylake-avx512' +expect generic-skipped 0 'skipped for x86_64/generic' \ + "$check" "$work/Axpy.tar" x86_64/generic "$refs" +expect no-reference-skipped 0 'no reference for x86_64/intel/nosuchcpu' \ + "$check" "$work/Axpy.tar" x86_64/intel/nosuchcpu "$refs" +expect skip-variable 0 'EESSI_SKIP_ISA_AUDIT is set' \ + env EESSI_SKIP_ISA_AUDIT=1 "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" +expect bad-tarball 1 '^ERROR: instruction audit: cannot unpack' \ + "$check" "$work/missing.tar" x86_64/intel/haswell "$refs" + +echo "$fails failure(s)" +[ "$fails" -eq 0 ] From 76ce7d66e365900c988c2b0303d448bbb23af12b Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Oct 2026 07:50:50 -0500 Subject: [PATCH 14/16] Name the FMA4 code in Rust binaries in the dispatch list The two vfmaddsd sites in bin/rust-analyzer sit in compiler_builtins::math::libm_math::arch::x86::fma::fma_with_fma4, the libm fma that compiler_builtins picks after a cpuid check. nm on the 2025.06 intel/icelake Rust 1.91.1 shows the symbol. Any Rust program that calls f64::mul_add without FMA in its target features links the same function, so packages with Rust code need fma4 on their line too. --- scripts/isa_audit/dispatch-allow.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/isa_audit/dispatch-allow.txt b/scripts/isa_audit/dispatch-allow.txt index a255e767..1c87c064 100644 --- a/scripts/isa_audit/dispatch-allow.txt +++ b/scripts/isa_audit/dispatch-allow.txt @@ -21,5 +21,4 @@ Qt6 xop # WebEngine (Chromium) bundled code with dispatch RStudio-Server cldemote,rtm,xop # bundled node, pandoc, typst Pandoc rtm,xop # statically linked runtime with dispatch GCCcore fma4,rtm # libgfortran matmul variants chosen at run time (fma4); libitm hardware transactions behind cpuid (rtm) -# Not confirmed as dispatch; may be linear-sweep decoding of data in .text: -Rust fma4 # bin/rust-analyzer, 2 sites (vfmaddsd) +Rust fma4 # compiler_builtins fma_with_fma4 (libm fma), chosen after a cpuid check From 0896984e76e57bdda5d007ae764bfe5942703be5 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Oct 2026 08:51:18 -0500 Subject: [PATCH 15/16] Check generic targets against the x86-64 and armv8-a baselines Generic targets were skipped because #311 has no reference for them. generate_generic_references.sh records what GCC enables for -march=x86-64 and -mcpu=generic, the flags EasyBuild passes for optarch GENERIC, in references/ next to the auditor, and check_tarball.sh now uses them for x86_64/generic and aarch64/generic. Against a baseline, a few instructions show up in code that is safe on every CPU of the architecture, so they pass by rule: - tzcnt is rep bsf, which runs as bsf without BMI1; GCC emits it for __builtin_ctz at -march=x86-64. - xgetbv faults without OSXSAVE, so detection code runs it only after that CPUID check. - libgcc's -moutline-atomics helpers use LSE only when __aarch64_have_lse_atomics is set; in stripped libraries they are found by that check instead of by name. Allow lines can now end in function globs, so a line covers only the dispatched functions and the same feature elsewhere in the package still fails. The aarch64 auditor takes the allow file as well, names the function around each violation, and streams llvm-objdump output: holding the disassembly of the aarch64 OpenBLAS in memory got the process killed. --- scripts/isa_audit/check_tarball.sh | 12 +- .../isa_audit/generate_generic_references.sh | 36 +++++ scripts/isa_audit/isa_audit.py | 94 +++++++++--- scripts/isa_audit/isa_audit_aarch64.py | 140 +++++++++++++++--- .../references/aarch64/generic/baseline.txt | 1 + .../references/x86_64/generic/baseline.txt | 106 +++++++++++++ tests/isa_audit/test_check_tarball.sh | 58 +++++++- 7 files changed, 394 insertions(+), 53 deletions(-) create mode 100755 scripts/isa_audit/generate_generic_references.sh create mode 100644 scripts/isa_audit/references/aarch64/generic/baseline.txt create mode 100644 scripts/isa_audit/references/x86_64/generic/baseline.txt diff --git a/scripts/isa_audit/check_tarball.sh b/scripts/isa_audit/check_tarball.sh index e5cd20a4..2a843ecc 100755 --- a/scripts/isa_audit/check_tarball.sh +++ b/scripts/isa_audit/check_tarball.sh @@ -7,8 +7,10 @@ # software-layer-scripts#311 (scripts/native_flags/references); the newest gcc # reference for the target is used. x86_64 targets are audited with # isa_audit.py (iced-x86), aarch64 targets with isa_audit_aarch64.py -# (llvm-objdump). Generic targets are skipped. A violation prints an "ERROR:" -# line, which bot/check-build.sh already reports as a failed build. +# (llvm-objdump). Generic targets use the baseline references in +# references/ next to this script (x86-64 and armv8-a, written by +# generate_generic_references.sh). A violation prints an "ERROR:" line, which +# bot/check-build.sh already reports as a failed build. set -uo pipefail tarball=$1 subdir=$2 refdir=$3 allow=${4:-} here=$(dirname "$(readlink -f "$0")") @@ -16,7 +18,7 @@ if [ -n "${EESSI_SKIP_ISA_AUDIT:-}" ]; then echo ">> instruction audit: skipped, \$EESSI_SKIP_ISA_AUDIT is set"; exit 0 fi case $subdir in - */generic) echo ">> instruction audit: skipped for $subdir"; exit 0 ;; + */generic) refdir=$here/references ;; esac case ${subdir%%/*} in x86_64) @@ -30,7 +32,7 @@ case ${subdir%%/*} in exit 0 fi ;; esac -ref=$(ls "$refdir/$subdir"/gcc-*.txt 2>/dev/null | sort -V | tail -1) +ref=$(ls "$refdir/$subdir"/gcc-*.txt "$refdir/$subdir"/baseline.txt 2>/dev/null | sort -V | tail -1) if [ -z "$ref" ]; then [ "${subdir%%/*}" = aarch64 ] && ref=$(ls "$refdir/$subdir"/clang-*.txt 2>/dev/null | sort -V | tail -1) fi @@ -44,7 +46,7 @@ trap 'chmod -R u+w "$work" 2>/dev/null; rm -rf "$work"' EXIT tar -xf "$tarball" -C "$work" || { echo "ERROR: instruction audit: cannot unpack $tarball"; exit 1; } case ${subdir%%/*} in x86_64) out=$(python3 "$here/isa_audit.py" ${allow:+--allow "$allow"} "$ref" "$work") ;; - aarch64) out=$(python3 "$here/isa_audit_aarch64.py" "$ref" "$work") ;; + aarch64) out=$(python3 "$here/isa_audit_aarch64.py" ${allow:+--allow "$allow"} "$ref" "$work") ;; *) echo ">> instruction audit: no auditor for ${subdir%%/*}"; exit 0 ;; esac rc=$? diff --git a/scripts/isa_audit/generate_generic_references.sh b/scripts/isa_audit/generate_generic_references.sh new file mode 100755 index 00000000..e0d4f8f0 --- /dev/null +++ b/scripts/isa_audit/generate_generic_references.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Write the baseline references that check_tarball.sh uses for the generic CPU targets. +# +# generate_generic_references.sh [GCC] +# +# EasyBuild builds generic targets with --optarch=GENERIC, which GCC turns into +# '-march=x86-64 -mtune=generic' on x86_64 and '-mcpu=generic' (armv8-a) on aarch64. +# For x86_64, GCC is asked which extensions that option enables (gcc -Q --help=target), +# for every extension named in the newest x86_64 native-flags reference of the same GCC +# version, and the result is written in the same -mX / -mno-X form as those references. +# For aarch64, the reference is the single -mcpu line, which isa_audit_aarch64.py reads. +set -euo pipefail +gcc=${1:-gcc} +here=$(dirname "$(readlink -f "$0")") +refs=$here/../native_flags/references +out=$here/references +version=$("$gcc" -dumpfullversion) +native=$(ls "$refs"/x86_64/*/*/gcc-"$version".txt | head -1) +[ -n "$native" ] || { echo "no x86_64 native reference for GCC $version under $refs" >&2; exit 1; } +targets=$("$gcc" -march=x86-64 -mtune=generic -Q --help=target) +mkdir -p "$out/x86_64/generic" "$out/aarch64/generic" +{ + echo "-march=x86-64" + grep -E '^-m(no-)?[a-z0-9.-]+$' "$native" | grep -vE '^-m(arch|tune)=' | sed -E 's/^-m(no-)?//' | while read -r ext; do + state=$(awk -v opt="-m$ext" '$1 == opt {print $2}' <<< "$targets") + case $state in + "[enabled]") echo "-m$ext" ;; + "[disabled]") echo "-mno-$ext" ;; + *) echo "GCC $version reports no state for -m$ext" >&2; exit 1 ;; + esac + done + echo "-mtune=generic" +} > "$out/x86_64/generic/baseline.txt" +printf -- '-mcpu=generic\n' > "$out/aarch64/generic/baseline.txt" +echo "wrote $out/x86_64/generic/baseline.txt (GCC $version, extension list from ${native#"$refs"/})" +echo "wrote $out/aarch64/generic/baseline.txt" diff --git a/scripts/isa_audit/isa_audit.py b/scripts/isa_audit/isa_audit.py index 1f649bad..5a75e54c 100644 --- a/scripts/isa_audit/isa_audit.py +++ b/scripts/isa_audit/isa_audit.py @@ -16,11 +16,16 @@ status is 1 when there is any violation against the first reference. --allow FILE lists code that selects its instruction set at run time, one -"PACKAGE feature[,feature...] # reason" per line. A violation in a file under -/software/PACKAGE/ on a listed feature is reported as DISPATCH, not counted as -a failure; the dynamic chip check (SDE) covers what actually runs. +"PACKAGE feature[,feature...] [FUNCTION[,FUNCTION...]] # reason" per line. A +violation in a file under /software/PACKAGE/ on a listed feature is reported +as DISPATCH, not counted as a failure; the dynamic chip check (SDE) covers +what actually runs. When FUNCTION globs are given, only instructions inside a +function whose symbol matches one of them are covered, so the same feature +anywhere else in the package is still a violation. """ +import bisect import collections +import fnmatch import os import sys @@ -66,6 +71,16 @@ #: returned a non-zero shadow-stack pointer CET_UNWIND = {Mnemonic.RDSSPD, Mnemonic.RDSSPQ, Mnemonic.INCSSPD, Mnemonic.INCSSPQ} +#: TZCNT is encoded as REP BSF, which a CPU without BMI1 runs as BSF; GCC and +#: LLVM emit it for count-trailing-zeros where a zero input is excluded, so the +#: result is the same on every x86-64 CPU (LZCNT has no such property) +TZCNT_AS_BSF = {Mnemonic.TZCNT} + +#: XGETBV reads XCR0 to learn which register state the OS saves; it faults +#: unless CPUID reports OSXSAVE, so CPU-detection code runs it only after +#: that check, and compilers never emit it on their own +XGETBV = {Mnemonic.XGETBV} + def norm(name: str) -> str: return name.lower().replace("_", "").replace("-", "").replace(".", "") @@ -103,8 +118,40 @@ def elf_files(paths): yield p -def audit_file(path, refs, names, viol, unclassified, counts): +def function_lookup(elf): + """Map an address to the name of the code symbol that contains it. + + Hand-written assembly often labels its functions with untyped symbols, so + those count too; an address past the end of a sized function is unnamed. + """ + syms = [] + for name in (".symtab", ".dynsym"): + tab = elf.get_section_by_name(name) + if tab is None: + continue + for s in tab.iter_symbols(): + kind = s["st_info"]["type"] + if not s["st_value"] or s.name == "" or s["st_shndx"] in ("SHN_UNDEF", "SHN_ABS"): + continue + if kind in ("STT_FUNC", "STT_GNU_IFUNC") or ( + kind == "STT_NOTYPE" and not s.name.startswith(".")): + syms.append((s["st_value"], s["st_size"], s.name)) + syms.sort() + addrs = [a for a, _, _ in syms] + + def lookup(ip): + i = bisect.bisect_right(addrs, ip) - 1 + if i < 0: + return "" + start, size, name = syms[i] + return name if size == 0 or ip < start + size else "" + return lookup + + +def audit_file(path, refs, names, viol, disp, unclassified, counts, allow): """Decode every executable section once; check each reference.""" + rules = [(feats, globs) for pkg, entries in allow.items() + if f"/software/{pkg}/" in path for feats, globs in entries] try: with open(path, "rb") as fh: if fh.read(4) != b"\x7fELF": @@ -113,6 +160,7 @@ def audit_file(path, refs, names, viol, unclassified, counts): elf = ELFFile(fh) if elf["e_machine"] != "EM_X86_64": return False + lookup = function_lookup(elf) if any(g for _, g in rules) else None for sec in elf.iter_sections(): if not sec["sh_flags"] & SH_FLAGS.SHF_EXECINSTR or sec["sh_type"] == "SHT_NOBITS": continue @@ -122,13 +170,21 @@ def audit_file(path, refs, names, viol, unclassified, counts): for f in ins.cpuid_features(): n = norm(names.get(f, str(f))) n = norm(ALIASES.get(n, n)) - if n in BASELINE or (n == "shstk" and ins.mnemonic in CET_UNWIND): + if n in BASELINE or (n == "shstk" and ins.mnemonic in CET_UNWIND) \ + or (n == "bmi" and ins.mnemonic in TZCNT_AS_BSF) \ + or (n == "xsave" and ins.mnemonic in XGETBV): continue for r, (have, lack) in enumerate(refs): if n in have: continue if n in lack: - viol[r].setdefault((n, path), (ins.ip, f"{ins}")) + hit = viol + for feats, globs in rules: + if n in feats and (not globs or any( + fnmatch.fnmatchcase(lookup(ins.ip), g) for g in globs)): + hit = disp + break + hit[r].setdefault((n, path), (ins.ip, f"{ins}")) counts[(r, n)] += 1 else: unclassified[r][n] += 1 @@ -138,21 +194,17 @@ def audit_file(path, refs, names, viol, unclassified, counts): def load_allow(path): - allow = {} + """PACKAGE -> list of (features, function globs); no globs covers the package.""" + allow = collections.defaultdict(list) for line in open(path): line = line.split("#", 1)[0].split() if len(line) >= 2: - allow[line[0]] = {norm(f) for f in line[1].split(",") if f} + feats = {norm(ALIASES.get(norm(f), f)) for f in line[1].split(",") if f} + globs = [g for g in line[2].split(",") if g] if len(line) > 2 else [] + allow[line[0]].append((feats, globs)) return allow -def allowed(path, feat, allow): - for pkg, feats in allow.items(): - if f"/software/{pkg}/" in path and feat in feats: - return True - return False - - def main(argv): allow = {} if argv[:1] == ["--allow"]: @@ -165,23 +217,21 @@ def main(argv): refs = [load_reference(p) for p in ref_paths] names = feature_names() viol = [dict() for _ in refs] + disp = [dict() for _ in refs] unclassified = [collections.Counter() for _ in refs] counts = collections.Counter() nfiles = 0 for f in elf_files(argv[1:]): - if audit_file(f, refs, names, viol, unclassified, counts): + if audit_file(f, refs, names, viol, disp, unclassified, counts, allow): nfiles += 1 print(f"audited {nfiles} x86-64 ELF files, {counts['instructions']} instructions") for r, path in enumerate(ref_paths): have, lack = refs[r] print(f"reference {path}: {len(have)} extensions present, {len(lack)} absent") - real = {} - for (feat, fpath), (ip, text) in sorted(viol[r].items()): - kind = "DISPATCH" if allowed(fpath, feat, allow) else "VIOLATION" - if kind == "VIOLATION": - real[(feat, fpath)] = 1 + sites = {k: ("DISPATCH", v) for k, v in disp[r].items()} + sites.update({k: ("VIOLATION", v) for k, v in viol[r].items()}) + for (feat, fpath), (kind, (ip, text)) in sorted(sites.items()): print(f"{kind}[{r}] {feat} x{counts[(r, feat)]} first in {fpath} at {ip:#x}: {text}") - viol[r] = real for feat, n in unclassified[r].most_common(): print(f"unclassified[{r}] {feat} x{n}") print(f"RESULT[{r}]", "fail" if viol[r] else "pass") diff --git a/scripts/isa_audit/isa_audit_aarch64.py b/scripts/isa_audit/isa_audit_aarch64.py index 7fd65218..cd35021a 100644 --- a/scripts/isa_audit/isa_audit_aarch64.py +++ b/scripts/isa_audit/isa_audit_aarch64.py @@ -9,11 +9,25 @@ clang: "-target-cpu X" and "-target-feature +f" lines gcc: one "-mcpu=X+f+nof..." line - python isa_audit_aarch64.py REFERENCE PATH [PATH ...] + python isa_audit_aarch64.py [--allow FILE] REFERENCE PATH [PATH ...] llvm-objdump must be on PATH (LLVM 20 or later). Exit status 1 on violation. + +The helpers libgcc links for -moutline-atomics (__aarch64_ldadd8_acq_rel and +friends) carry LSE instructions behind a check of HWCAP_ATOMICS, so +instructions inside those functions pass by rule. In a stripped file the +helpers have no names; they are recognised by their shape instead: the LSE +instruction directly follows "ldrb w16, [__aarch64_have_lse_atomics]" and +"cbz w16". + +Each violation is attributed to the LLVM feature that makes it decode when +added to the target. --allow FILE takes the same "PACKAGE feature[,...] +[FUNCTION[,...]] # reason" lines as isa_audit.py, with LLVM feature names: a +violation in a file under /software/PACKAGE/ on a listed feature, and inside a +matching function when globs are given, is reported as DISPATCH. """ import collections +import fnmatch import os import re import subprocess @@ -37,6 +51,22 @@ #: clang -target-feature entries that are code-generation options, not ISA NOT_ISA = {"outline-atomics", "fmv"} +#: function label line in llvm-objdump -d output +LABEL = re.compile(r"^([0-9a-f]+) <(.+)>:$") + +#: libgcc's -moutline-atomics helpers, which use LSE only when HWCAP_ATOMICS is set +OUTLINE_ATOMICS = re.compile(r"^__aarch64_(cas|casp|swp|ldadd|ldclr|ldeor|ldset)(1|2|4|8|16)_(relax|acq|rel|acq_rel|sync)$") + +#: LLVM features tried, in order, to name the feature a violation needs; +#: both the LLVM 19 (sve2-*) and LLVM 20 (sve-*) names of the SVE2 crypto features +CANDIDATES = [ + "crc", "lse", "rdm", "rcpc", "rcpc-immo", "dotprod", "fullfp16", "fp16fml", + "aes", "sha2", "sha3", "sm4", "jsconv", "complxnum", "flagm", "pauth", "rand", + "ssbs", "sb", "predres", "frintts", "altnzcv", "i8mm", "bf16", "mte", + "sve", "sve2", "sve-aes", "sve2-aes", "sve-sha3", "sve2-sha3", "sve-sm4", + "sve2-sm4", "sve-bitperm", "sve2-bitperm", "ls64", "sme", "lse128", "rcpc3", +] + def target_args(path): cpu, feats = None, [] @@ -67,14 +97,61 @@ def target_args(path): def disassemble(path, extra): - out = subprocess.run(["llvm-objdump", "-d"] + extra + [path], - capture_output=True, text=True) - insns = {} - for line in out.stdout.splitlines(): + """Yield (address, mnemonic, operands, enclosing function), streamed so + that large libraries are never held in memory whole.""" + proc = subprocess.Popen(["llvm-objdump", "-d"] + extra + [path], + stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True) + func = "" + for line in proc.stdout: + lab = LABEL.match(line.rstrip("\n")) + if lab: + func = lab.group(2) + continue m = LINE.match(line) if m: - insns[m.group(1)] = (m.group(2), m.group(3).strip()) - return insns + yield m.group(1), m.group(2), m.group(3).strip(), func + proc.wait() + + +def with_feature(restrict, feature): + """The target's llvm-objdump arguments with one more feature.""" + args = list(restrict) + for i, a in enumerate(args): + if a.startswith("--mattr="): + args[i] = a + ",+" + feature + return args + return args + ["--mattr=+" + feature] + + +def attribute(path, restrict, addrs): + """Name the first candidate feature that makes each address decode.""" + found, left = {}, set(addrs) + for feat in CANDIDATES: + if not left: + break + for a, mn, _, _ in disassemble(path, with_feature(restrict, feat)): + if a in left and mn != "": + found[a] = feat + left.discard(a) + return found + + +def load_allow(path): + """PACKAGE -> list of (features, function globs); no globs covers the package.""" + allow = collections.defaultdict(list) + for line in open(path): + line = line.split("#", 1)[0].split() + if len(line) >= 2: + feats = set(f for f in line[1].split(",") if f) + globs = [g for g in line[2].split(",") if g] if len(line) > 2 else [] + allow[line[0]].append((feats, globs)) + return allow + + +def allowed(path, feat, func, allow): + return any(f"/software/{pkg}/" in path and feat in feats + and (not globs or any(fnmatch.fnmatchcase(func, g) for g in globs)) + for pkg, entries in allow.items() for feats, globs in entries) def is_aarch64_elf(path): @@ -101,30 +178,53 @@ def files(paths): def main(argv): + allow = {} + if argv[:1] == ["--allow"]: + allow = load_allow(argv[1]) + argv = argv[2:] if len(argv) < 2: print(__doc__) return 2 restrict = target_args(argv[0]) - viol, first = collections.Counter(), {} - nfiles = ninsn = 0 + viol, disp, first = collections.Counter(), collections.Counter(), {} + nfiles = ninsn = natomics = 0 for f in files(argv[1:]): if not is_aarch64_elf(f): continue - full = disassemble(f, []) - narrow = disassemble(f, restrict) + unknown = {a for a, mn, _, _ in disassemble(f, restrict) if mn == ""} nfiles += 1 - ninsn += len(full) - for addr, (mn, ops) in full.items(): - if mn == "": + full, bad = {}, [] + prev = [("", ""), ("", "")] + for addr, mn, ops, func in disassemble(f, []): + ninsn += 1 + guarded = prev[0][0] == "ldrb" and prev[0][1].startswith("w16,") \ + and prev[1][0] == "cbz" and prev[1][1].startswith("w16,") + prev = [prev[1], (mn, ops)] + if mn == "" or addr not in unknown: continue - if narrow.get(addr, ("", ""))[0] == "": - viol[mn] += 1 - first.setdefault(mn, (f, addr, ops)) + if OUTLINE_ATOMICS.match(func) or guarded: + natomics += 1 + else: + full[addr] = (mn, ops, func) + bad.append(addr) + del unknown + if not bad: + continue + feats = attribute(f, restrict, bad) + for addr in bad: + mn, ops, func = full[addr] + key = (feats.get(addr, "unknown"), mn) + target = disp if allowed(f, key[0], func, allow) else viol + target[key] += 1 + first.setdefault(key, (f, addr, ops, func)) print(f"target {' '.join(restrict)}") print(f"audited {nfiles} aarch64 ELF files, {ninsn} instructions") - for mn, n in viol.most_common(15): - f, addr, ops = first[mn] - print(f"VIOLATION {mn} x{n} first in {f} at 0x{addr}: {mn} {ops}") + if natomics: + print(f"outline-atomics {natomics} LSE instructions in libgcc -moutline-atomics helpers, passed by rule") + for kind, cnt in (("DISPATCH", disp), ("VIOLATION", viol)): + for (feat, mn), n in cnt.most_common(15): + f, addr, ops, func = first[(feat, mn)] + print(f"{kind} {feat} {mn} x{n} first in {f} at 0x{addr} <{func}>: {mn} {ops}") print(f"violations {sum(viol.values())} in {len(viol)} mnemonics") print("RESULT", "fail" if viol else "pass") return 1 if viol else 0 diff --git a/scripts/isa_audit/references/aarch64/generic/baseline.txt b/scripts/isa_audit/references/aarch64/generic/baseline.txt new file mode 100644 index 00000000..be63beff --- /dev/null +++ b/scripts/isa_audit/references/aarch64/generic/baseline.txt @@ -0,0 +1 @@ +-mcpu=generic diff --git a/scripts/isa_audit/references/x86_64/generic/baseline.txt b/scripts/isa_audit/references/x86_64/generic/baseline.txt new file mode 100644 index 00000000..152934b9 --- /dev/null +++ b/scripts/isa_audit/references/x86_64/generic/baseline.txt @@ -0,0 +1,106 @@ +-march=x86-64 +-mmmx +-mno-popcnt +-msse +-msse2 +-mno-sse3 +-mno-ssse3 +-mno-sse4.1 +-mno-sse4.2 +-mno-avx +-mno-avx2 +-mno-sse4a +-mno-fma4 +-mno-xop +-mno-fma +-mno-avx512f +-mno-bmi +-mno-bmi2 +-mno-aes +-mno-pclmul +-mno-avx512vl +-mno-avx512bw +-mno-avx512dq +-mno-avx512cd +-mno-avx512vbmi +-mno-avx512ifma +-mno-avx512vpopcntdq +-mno-avx512vbmi2 +-mno-gfni +-mno-vpclmulqdq +-mno-avx512vnni +-mno-avx512bitalg +-mno-avx512bf16 +-mno-avx512vp2intersect +-mno-3dnow +-mno-adx +-mno-abm +-mno-cldemote +-mno-clflushopt +-mno-clwb +-mno-clzero +-mno-cx16 +-mno-enqcmd +-mno-f16c +-mno-fsgsbase +-mfxsr +-mno-hle +-mno-sahf +-mno-lwp +-mno-lzcnt +-mno-movbe +-mno-movdir64b +-mno-movdiri +-mno-mwaitx +-mno-pconfig +-mno-pku +-mno-prfchw +-mno-ptwrite +-mno-rdpid +-mno-rdrnd +-mno-rdseed +-mno-rtm +-mno-serialize +-mno-sgx +-mno-sha +-mno-shstk +-mno-tbm +-mno-tsxldtrk +-mno-vaes +-mno-waitpkg +-mno-wbnoinvd +-mno-xsave +-mno-xsavec +-mno-xsaveopt +-mno-xsaves +-mno-amx-tile +-mno-amx-int8 +-mno-amx-bf16 +-mno-uintr +-mno-hreset +-mno-kl +-mno-widekl +-mno-avxvnni +-mno-avx512fp16 +-mno-avxifma +-mno-avxvnniint8 +-mno-avxneconvert +-mno-cmpccxadd +-mno-amx-fp16 +-mno-prefetchi +-mno-raoint +-mno-amx-complex +-mno-avxvnniint16 +-mno-sm3 +-mno-sha512 +-mno-sm4 +-mno-apxf +-mno-usermsr +-mno-avx10.2 +-mno-amx-avx512 +-mno-amx-tf32 +-mno-amx-transpose +-mno-amx-fp8 +-mno-movrs +-mno-amx-movrs +-mtune=generic diff --git a/tests/isa_audit/test_check_tarball.sh b/tests/isa_audit/test_check_tarball.sh index e63124b6..d88162fe 100755 --- a/tests/isa_audit/test_check_tarball.sh +++ b/tests/isa_audit/test_check_tarball.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Tests for scripts/isa_audit/check_tarball.sh on small tarballs built here. +# Tests for scripts/isa_audit/check_tarball.sh on small tarballs built here, +# for native targets and for the generic baselines. # Needs gcc, python3 with iced-x86 and pyelftools; the aarch64 cases also need # aarch64-linux-gnu-gcc and llvm-objdump, and are skipped without them. set -uo pipefail @@ -10,12 +11,22 @@ work=$(mktemp -d) trap 'rm -rf "$work"' EXIT fails=0 -# build TARGET PACKAGE CC CFLAGS: compile a shared library with one loop into a tarball +# build TARGET PACKAGE CC CFLAGS [EXTRA]: compile a shared library with one loop, +# one atomic increment and the C code in EXTRA into a tarball laid out the way +# create_tarball.sh writes it build() { - local target=$1 pkg=$2 cc=$3 cflags=$4 + local target=$1 pkg=$2 cc=$3 cflags=$4 extra=${5:-} local dir=$work/root/$target/software/$pkg/1.0/lib rm -rf "$work/root" && mkdir -p "$dir" - printf 'void axpy(int n, double a, const double *x, double *y)\n{ for (int i = 0; i < n; i++) y[i] += a * x[i]; }\n' > "$work/axpy.c" + cat > "$work/axpy.c" <<'SRC' +#include +_Atomic long calls; +void axpy(int n, double a, const double *x, double *y) +{ atomic_fetch_add(&calls, 1); for (int i = 0; i < n; i++) y[i] += a * x[i]; } +/* GCC writes count-trailing-zeros as rep bsf, which decodes as TZCNT */ +int lowest_bit(unsigned v) { return __builtin_ctz(v | 1u); } +SRC + echo "$extra" >> "$work/axpy.c" # shellcheck disable=SC2086 # CFLAGS holds several flags $cc -O3 -shared -fPIC $cflags -o "$dir/libaxpy.so" "$work/axpy.c" || return 1 tar -C "$work/root" -cf "$work/$pkg.tar" "$target" @@ -49,6 +60,21 @@ if python3 -c 'import iced_x86, elftools' 2>/dev/null; then build x86_64/intel/haswell Axpy gcc '-march=haswell' expect x86-native-pass 0 'pass against gcc-' \ "$check" "$work/Axpy.tar" x86_64/intel/haswell "$refs" + expect x86-generic-violation 1 'VIOLATION\[0\] avx2 ' \ + "$check" "$work/Axpy.tar" x86_64/generic "$refs" + build x86_64/generic Axpy gcc '-march=x86-64 -mtune=generic' + expect x86-generic-pass 0 'pass against baseline.txt' \ + "$check" "$work/Axpy.tar" x86_64/generic "$refs" + # an AVX2 kernel next to baseline code, as a run-time dispatcher would pick it + build x86_64/generic Axpy gcc '-march=x86-64 -mtune=generic' \ + '__attribute__((target("avx2"))) void axpy_avx2(int n, double a, const double *x, double *y) +{ for (int i = 0; i < n; i++) y[i] += a * x[i]; }' + echo 'Axpy avx,avx2 axpy_avx2 # test' > "$work/allow-fn.txt" + expect x86-generic-function-dispatch 0 'DISPATCH\[0\] avx2 ' \ + "$check" "$work/Axpy.tar" x86_64/generic "$refs" "$work/allow-fn.txt" + echo 'Axpy avx,avx2 other_* # test' > "$work/allow-fn.txt" + expect x86-generic-function-miss 1 'VIOLATION\[0\] avx2 ' \ + "$check" "$work/Axpy.tar" x86_64/generic "$refs" "$work/allow-fn.txt" else echo "SKIP x86_64 cases: python3 cannot import iced_x86 and elftools" fi @@ -59,13 +85,33 @@ if command -v aarch64-linux-gnu-gcc >/dev/null && command -v llvm-objdump >/dev/ "$check" "$work/Axpy.tar" aarch64/neoverse_n1 "$refs" expect aarch64-same-target 0 'pass against gcc-' \ "$check" "$work/Axpy.tar" aarch64/neoverse_v1 "$refs" + expect aarch64-generic-sve-violation 1 'VIOLATION sve ' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" + # GCC's default -moutline-atomics puts LSE in libgcc helpers chosen by HWCAP_ATOMICS + build aarch64/generic Axpy aarch64-linux-gnu-gcc '-mcpu=generic -moutline-atomics' + expect aarch64-generic-pass 0 'pass against baseline.txt' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" + # the same helpers in a stripped library, found by their HWCAP check + build aarch64/generic Axpy aarch64-linux-gnu-gcc '-mcpu=generic -moutline-atomics -s' + expect aarch64-generic-stripped-pass 0 'pass against baseline.txt' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" + build aarch64/generic Axpy aarch64-linux-gnu-gcc '-march=armv8.1-a -mno-outline-atomics' + expect aarch64-generic-lse-violation 1 'VIOLATION lse ' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" + echo 'Axpy lse # test' > "$work/allow-a64.txt" + expect aarch64-generic-lse-dispatch 0 'DISPATCH lse ' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" "$work/allow-a64.txt" + echo 'Axpy lse axpy # test' > "$work/allow-a64.txt" + expect aarch64-generic-function-dispatch 0 'DISPATCH lse ' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" "$work/allow-a64.txt" + echo 'Axpy lse other_* # test' > "$work/allow-a64.txt" + expect aarch64-generic-function-miss 1 'VIOLATION lse ' \ + "$check" "$work/Axpy.tar" aarch64/generic "$refs" "$work/allow-a64.txt" else echo "SKIP aarch64 cases: aarch64-linux-gnu-gcc or llvm-objdump not found" fi build x86_64/intel/haswell Axpy gcc '-march=skylake-avx512' -expect generic-skipped 0 'skipped for x86_64/generic' \ - "$check" "$work/Axpy.tar" x86_64/generic "$refs" expect no-reference-skipped 0 'no reference for x86_64/intel/nosuchcpu' \ "$check" "$work/Axpy.tar" x86_64/intel/nosuchcpu "$refs" expect skip-variable 0 'EESSI_SKIP_ISA_AUDIT is set' \ From b865f6c54580b16c4ccf13d7252892fbdc8ed3f9 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Oct 2026 08:51:18 -0500 Subject: [PATCH 16/16] Add the dispatch sites found in the generic 2025.06 installs Auditing 25 x86_64/generic and 19 aarch64/generic installs from 2025.06 against the new baselines flagged dispatch code in OpenBLAS, OpenMPI, Boost, zstd, libjpeg-turbo, libwebp, pixman, x264, FFmpeg, libfabric, NumPy and GCCcore's runtime libraries. Each line names how the code is chosen and, where the symbols allow it, lists the functions too, e.g. ompi_op_avx_* for OpenMPI or *_bmi2* for zstd. The old package-wide GCCcore line is split up the same way. OpenBLAS, FFmpeg and NumPy stay package-wide: FFmpeg is stripped, and the other two compile whole objects per target, with helpers that carry no target in their names. Two installs still fail and stay off the list, since nothing picks their code at run time: UCX 1.19.0 is built with -mavx because its easyconfig enables UCX's optimizations, and NumPy's baseline in SciPy-bundle 2025.07 includes SSE3. --- scripts/isa_audit/dispatch-allow.txt | 35 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/scripts/isa_audit/dispatch-allow.txt b/scripts/isa_audit/dispatch-allow.txt index 1c87c064..99789223 100644 --- a/scripts/isa_audit/dispatch-allow.txt +++ b/scripts/isa_audit/dispatch-allow.txt @@ -1,8 +1,11 @@ # Packages whose binaries carry instructions beyond the target in code chosen -# at run time by a CPUID check. Seeded from the 2025.06 intel/icelake baseline; -# each line: package, features, mechanism. -FFmpeg fma4,xop # hand-written assembly, av_get_cpu_flags dispatch +# at run time by a CPUID check. Seeded from the 2025.06 intel/icelake baseline +# and a sample of 2025.06 x86_64/generic packages; each line: package, +# features, optional function-symbol globs, mechanism. A line with globs +# covers only instructions inside matching functions. +FFmpeg 3dnow,avx,avx2,avx512bw,avx512dq,avx512f,avx512vbmi,avx512vl,avx512vnni,bmi2,fma,fma4,sse3,sse41,ssse3,xop # hand-written assembly, av_get_cpu_flags dispatch; stripped, so no globs x264 fma4,xop # hand-written assembly, x264_cpu_detect dispatch +x264 avx,avx2,avx512bw,avx512cd,avx512dq,avx512f,avx512vl,bmi2,fma,lzcnt,sse3,sse41,ssse3 *_sse3*,*_ssse3*,*_sse4*,*_avx*,*_xop*,*_fma4*,*_bmi2*,*_lzcnt*,predict_*_p_* # same assembly, by function suffix OpenSSL rtm,xop # OPENSSL_ia32cap dispatch GnuTLS xop # bundled crypto assembly with CPU dispatch tbb rtm,waitpkg # speculative locks and tpause behind cpuid checks @@ -12,7 +15,7 @@ R-bundle-CRAN rtm # RcppParallel bundled libtbb IQ-TREE rtm,waitpkg # bundled tbb LLVM rtm,waitpkg # libomp lock and wait paths behind cpuid checks libfabric enqcmd,movdir64b # DSA provider, used only when the device exists -SciPy-bundle avx512fp16 # NumPy NPY_CPU_DISPATCH kernels +SciPy-bundle avx,avx2,avx512bw,avx512dq,avx512f,avx512fp16,avx512vbmi2,avx512vl,bmi2,f16c,fma,popcnt,sse41,sse42,ssse3 # NumPy NPY_CPU_DISPATCH kernels; their objects carry unsuffixed helpers, so no globs imkl amxbf16,amxfp16,amxint8,amxtile,avx512bf16,avx512fp16,avxvnni,fma4,rtm,waitpkg # per-CPU code paths ollama avxvnni # per-architecture ggml-cpu libraries chosen at load Julia amxbf16,amxtile,avx512bf16,fma4,shstk,xop # bundled libraries with dispatch @@ -20,5 +23,27 @@ Java serialize # JIT and runtime stubs behind CPU checks Qt6 xop # WebEngine (Chromium) bundled code with dispatch RStudio-Server cldemote,rtm,xop # bundled node, pandoc, typst Pandoc rtm,xop # statically linked runtime with dispatch -GCCcore fma4,rtm # libgfortran matmul variants chosen at run time (fma4); libitm hardware transactions behind cpuid (rtm) +GCCcore avx,avx2,avx512f,avx512vl,fma,fma4 *matmul_*_avx* # libgfortran matmul variants chosen at run time +GCCcore avx,rtm _ITM_* # libitm AVX register save and hardware transactions behind cpuid +GCCcore avx libat_*_16_i1 # libatomic 16-byte ifunc variant for CPUs with AVX +GCCcore rdrnd,rdseed _ZNSt12_GLOBAL__N_1*__x86_rd* # std::random_device sources, used after a cpuid check Rust fma4 # compiler_builtins fma_with_fma4 (libm fma), chosen after a cpuid check +OpenBLAS avx,avx2,avx512bw,avx512dq,avx512f,avx512vl,bmi,bmi2,fma,fma4,prfchw,sse3,sse41,ssse3 # DYNAMIC_ARCH kernels picked per CPU at load +OpenMPI avx,avx2,avx512bw,avx512dq,avx512f,avx512vl ompi_op_avx_* # op/avx reductions, enabled by cpuid in the component +Boost avx,avx2,ssse3,sse3 *dump_data_*_avx2*,*dump_data_*_ssse3*,_ZNSt13basic_ostream*5write*.isra.0.cold # Boost.Log dump, picked by cpuid at load +Boost sse41 *find_address_sse41* # Boost.Atomic wait lookup, picked by cpuid +zstd bmi,bmi2,lzcnt *_bmi2*,*HUF_decompress4X?_usingDTable_internal_fast* # DYNAMIC_BMI2: called only when cpuid reports BMI2 +libjpeg-turbo avx,avx2,sse41 jsimd_* # SIMD paths picked by jpeg_simd_cpu_support +libwebp sse41,ssse3 *_SSE41* # VP8GetCPUInfo dispatch +pixman ssse3 ssse3_* # ssse3 fast paths picked by cpuid +libfabric avx,avx512f lpp_memcpy_avx* # LPP provider copies, picked by __builtin_cpu_supports +libfabric clflushopt,clwb pmem_commit_clflushopt,pmem_commit_clwb # persistent-memory flush, picked by cpuid +# aarch64 lines use LLVM feature names +OpenMPI sve ompi_op_aarch64_* # op/aarch64 SVE reductions, enabled when HWCAP_SVE is set +SciPy-bundle fullfp16 _ZN3hwy18N_NEON_WITHOUT_AES* # NumPy 16-bit Highway sort, built only for the ASIMDHP dispatch target +x264 dotprod,i8mm,sve,sve2 *_dotprod*,*_i8mm*,*_sve* # x264_cpu_detect reads HWCAP +FFmpeg dotprod,i8mm # hand-written assembly behind av_get_cpu_flags (HWCAP); stripped, so no globs +GCCcore sme __arm_tpidr2_*,__libgcc_arm_tpidr2_*,__arm_za_disable,__arm_sme_* # libgcc SME ABI routines, reached only with SME state live +GCCcore lse,lse128,rcpc3 libat_*_i[0-9] # libatomic ifunc variants chosen by HWCAP +GCCcore sve _Unwind_GetGR,execute_stack_op,uw_update_context*,__arm_tpidr2_*,__libgcc_arm_tpidr2_* # libgcc reads VG (cntd) lazily, only for frames that use SVE or SME +OpenBLAS complxnum,sme,sve,sve2 # DYNAMIC_ARCH kernels picked per CPU at load