Repository navigation
Experimental Arm: opt-in SVE targets, target reporting and Arm CI - #28
Merged
yohanchatelain merged 5 commits intoOct 7, 2026
Merged
Conversation
- sr_vector-inl.h: skip the thread_local exponent cache on SVE/RVV targets; sizeless vector types cannot have thread-local storage. HWY_TARGET_IS_SVE is needed since SVE2_128/SVE_256 have HWY_HAVE_SCALABLE == 0. - generic_vector-inl.h: define and export every fixed width (up to 512 bits) on every target. HWY_EXPORT needs the function in all compiled targets, but the guards used the static target's HWY_MAX_BYTES, which broke with HWY_SCALAR (GCC fallback) and with SVE (HWY_MAX_BYTES = 256). _<op>xN already loops when N exceeds the target's lanes. - Remove the 1024-bit fixed-size block, whose functions were never defined (only reached when HWY_MAX_BYTES >= 128, i.e. SVE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SVE vectors cannot be tuple members or array elements, so:
- test drivers pass scalar inputs as std::tuple<T...> and checkers broadcast
them with hn::Set (all inputs were already broadcasts);
- assert_equal_inputs uses a fold instead of iterating over {args...}
(also fixes the reported index, which was always 1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- configure: add --enable-experimental-sve (default: off). When off, HWY_DISABLED_TARGETS=HWY_ALL_SVE restricts aarch64 builds to NEON (no-op elsewhere). On aarch64, warn that Arm support is experimental, that -march=native targets a generic armv8 CPU when clang does not know the host, that the --with-arch flag enables SVE while SVE is disabled, and that clang < 22 generates no SVE code (< 21: none, 21: SVE2_128 only). - configure: accept LLVM up to 23.x (SVE needs clang >= 22), and fix the LLVM_PATH bridge, which only applied with --with-llvm=yes, so that llvm-config and llvm-link came from PATH instead of LLVM_PATH. - Add prism-target-info (make target-info, run by make): prints the static library's Highway target and the dynamic library's compiled and selected targets. - README: document the experimental Arm status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On ubuntu-24.04-arm runners (128-bit SVE): - neon: LLVM 18 and 20, default configuration. - sve: LLVM 22 with --enable-experimental-sve --with-arch=armv9-a+sve2. - sve-qemu: same build, functional tests run under qemu-aarch64 with 256- and 512-bit vectors (the statistical accuracy tests are too slow to emulate). SVE jobs are continue-on-error while SVE support is experimental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phases 3 and 4 of experimental Arm support. NEON is built by default on aarch64; SVE is opt-in. Both remain labelled experimental.
Target selection (
8aeb17b)./configure --enable-experimental-sve(default: off). When off, PRISM is compiled with-DHWY_DISABLED_TARGETS=HWY_ALL_SVE, so aarch64 builds are NEON-only. This is a no-op on other architectures. Why off by default:SVE2_128.configurewarnings on aarch64:-march=nativetargets a generic armv8 CPU because clang doesn't know the host. This is detected by comparing the predefined macros with-march=armv8-a. Checkingtarget-cpualone isn't enough: clang 20 on Neoverse N2 reportsgenericbut still enables the detected features.--with-archflag enables SVE while SVE targets are disabled.make target-info(also run bymake): prints the static library's Highway target and the dynamic library's compiled and selected targets. For example, on clang 18 / Cortex-X925,-march=nativegives aNEON_WITHOUT_AESstatic library.configurenow accepts LLVM up to 23.x, since SVE needs clang ≥ 22.LLVM_PATH→--with-llvmbridge: it only applied with an explicit--with-llvm=yes. Otherwisellvm-configandllvm-linkcame fromPATHrather thanLLVM_PATH, which could mix toolchains (e.g. clang 22 with LLVM 18'sllvm-config). The x86 CI works today only because the install action also prepends its LLVM toPATH.CI (
542599f):.github/workflows/arm-ci.ymlonubuntu-24.04-arm(128-bit SVE)neonsve(continue-on-error)--enable-experimental-sve --with-arch=armv9-a+sve2sve-qemu(continue-on-error)qemu-aarch64with 256- and 512-bit vectors. The statistical accuracy suites are too slow to emulateDependencies are installed by
.github/actions/arm-setup. It prefers Ubuntu's LLVM packages, because mixing them with apt.llvm.org's for the same version breaks on the runner image. apt.llvm.org is the fallback for versions Ubuntu doesn't ship.Validation
Run on my fork (with #27 merged in), all green:
Locally, on a Cortex-X925 (clang 18, clang 22, GCC 13):
configureoption combination behaves as described.HWY_DISABLED_TARGETSholds even when-marchenables SVE.Not tested: x86 with these
configurechanges beyond what this PR's CI runs.🤖 Generated with Claude Code