Repository navigation
Raise ARM baseline to ARMv8.4+SVE with modern extensions - #97781
Algunenano wants to merge 2 commits into
Conversation
…e for Neoverse V1 The modern ARM build profile targeted ARMv8.2 as the lowest common denominator for Graviton 2 and 3. With only 3 Graviton 2 machines remaining (0.13% of the ARM fleet), raise the baseline to ARMv8.4 which is supported by all current ARM instances: Graviton 3 (Neoverse V1), Graviton 4 (Neoverse V2), Azure Cobalt 100 (Neoverse N2), and GCP Axion (Neoverse V2). Changes: - Architecture: `armv8.2-a` -> `armv8.4-a` (subsumes `+dotprod`, `+rcpc`; adds `+rcpc2`, `+flagm`) - New extensions: `+sve` (scalable vector extensions for auto-vectorization), `+i8mm` (int8 matrix multiply), `+sha3` (SHA-3/SHA-512 hardware), `+fp16` (half-precision FP arithmetic) - Tuning: `-mtune=neoverse-v1` for the dominant core (93% of ARM fleet) - Rename `NO_ARMV81_OR_HIGHER` -> `NO_ARM_SVE` across the codebase - Enable `BUILD_SVE` and `HAVE_C_ARM_SVE_H` in vectorscan config - Update `universal.sh` install script to check for `sve` in cpuinfo Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Workflow [PR], commit [7544b4d] Summary: ❌
|
|
Does this impact Apple M4 (ARMv9.2 without SVE)? From a quick glance the patch seems to disable some functionality like GCP and simsimd on ARM platforms lacking SVE. This is a popular architecture for data analysts and those evaluating ClickHouse so probably better to align it with modern server ARM architectures and not the legacy fallback. |
|
This would impact all Apple products, but from the benchmarks it's clear that it isn't a good choice. I'll try to use this as a reference to know where to dispatch and whether we can tweak some other things in our NEON build |
Add optional ARMv8.2 extensions that are available on all target server hardware (Graviton 2+, Azure Cobalt 100, GCP Axion, Apple Silicon): - `+sha3`: SHA3 and SM3 hardware instructions (BCAX, EOR3, RAX1, XAR) - `+sha512`: SHA-512 and SHA-384 hardware instructions - `+fp16`: full half-precision FP arithmetic (scalar and NEON) Also add `-mtune=neoverse-v1` on Linux to tune instruction scheduling for the Graviton 3 microarchitecture (Neoverse V1), which is the primary ARM platform in CI and production. The tuning flag only affects scheduling, not the ISA, so the binary still runs on Graviton 2 and other ARMv8.2 hardware. The flag is gated on Linux because Apple Silicon has a completely different pipeline where Neoverse tuning would be counterproductive. The install script detection is updated to also check for `sha3`, `sha512`, and `fphp` so machines lacking these extensions correctly fall back to the compatibility build. Ref: ClickHouse#97781 Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Something interesting:
|
|
@Algunenano interesting. All failed tests give wrong results on l2 distance function. |
Summary
+i8mm(int8 matrix multiply),+sha3/+sha512(hardware crypto),+fp16(half-precision FP arithmetic).-mtune=neoverse-v1to optimize instruction scheduling for most common core (Graviton 3)NO_ARMV81_OR_HIGHER→NO_ARM_SVEacross the codebase to reflect the new baseline.BUILD_SVEandHAVE_C_ARM_SVE_Hin vectorscan (Hyperscan) config for ARM, enabling SVE codepaths in the regex engine.universal.shinstall script to check forsvein/proc/cpuinfoto dispatch between modern and compat builds.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Raise ARM build baseline from ARMv8.2 to ARMv8.4 with SVE,
+i8mm,+sha3,+fp16extensions and Neoverse V1 tuning, enabling better auto-vectorization and hardware-accelerated operations on modern ARM server CPUs (Graviton 3+, Azure Cobalt, GCP Axion).Documentation entry for user-facing changes
The compat ARM build (
NO_ARM_SVE=1, formerlyNO_ARMV81_OR_HIGHER) remains available for older hardware. Theuniversal.shinstall script automatically selects the appropriate build.🤖 Generated with Claude Code