Repository navigation
Enable fastops vectorized math on AArch64 and on FreeBSD/Darwin - #98230
Conversation
The upstream `fastops` library now supports ARM via NEON intrinsics. Enable it in our CMake for `ARCH_AARCH64` builds (when `NO_ARMV81_OR_HIGHER` is not set, since NEON requires ARMv8.1+). On ARM, only `ops_neon.cpp` and `fastops.cpp` are compiled — the x86-only `ops_plain.cpp` and `avx_id.cpp` are skipped. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Workflow [PR], commit [0521bb6] Summary: ❌
AI ReviewSummaryThis PR enables ClickHouse Rules
Final Verdict
|
|
After passing all tests in x86, NEON and SVE I decide to break this PR into a) enabling fastops in ARM and other OSs if possible and b) considering support for exp2 and exp10. The reason is result differences in these new functions as well as type changes. It's easier to verify and consider each change individually |
Move the `plain/ops_plain.cpp` and `core/avx_id.cpp` sources into the main `ARCH_AMD64` block, keeping each architecture's files together. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Multiple infra issues. I'll restart the CI |
2fd2ebe to
058a69c
Compare
The `docker compose up -d` calls for ZooKeeper and Keeper containers had no retry logic, unlike image pulls which already use `retry()`. When Docker-in-Docker's network subsystem isn't fully initialized, the transient "network ... not found" error immediately fails all tests in the shard. Wrap both ZooKeeper compose-up calls (regular and secure) with the same `retry()` decorator, using 3 retries with 3s base delay. Seen in ClickHouse#98230: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98230&sha=3a1a2a77d4ecaffb47629f3d75243946e1c36100&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%201%2F5%29 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
As I remember seeing, I'm having a look |
|
Addressed the regression in log. The problem was that in Graviton 3 SVE code was always faster than NEON as it uses 256-bit SVE, but on Graviton-4 they use 128-bit SVE and this is either slower or has the same performance of NEON. So it's solved by dispatching to SVE only in the case it's faster, while keeping NEON for anything else. |
|
Literally none of the affected functions run in this performance test batch after the fix. |
|
Let's fix the Upgrade check first. |
It's already reported and @Avogar is working on it |




Enable the
fastopsvectorized math library on AArch64 builds (NEON + SVEruntime dispatch) and remove the FreeBSD/Darwin exclusion on x86_64. Previously
fastopswas limited to x86_64 Linux; now it works on all supported platforms.Changes:
fastopssubmodule to include AArch64 NEON/SVE backends and newExp2/Exp10functionsARCH_AMD64 AND NOT OS_FREEBSD AND NOT OS_DARWINtoARCH_AMD64 OR (ARCH_AARCH64 AND NOT NO_ARMV81_OR_HIGHER)— this enables fastops on x86 FreeBSD/Darwin (previously excluded) and on ARM (ARMv8.1+ required)ops_neon.cppandops_sve.cpp(with-march=armv8-a+sve) to ARM builds; SVE is Linux-only sincearm_sve.his not available on Darwin/FreeBSD toolchainsops_plain.cppandavx_id.cppinto the x86 block since they are x86-specificRelated: ClickHouse/fastops#6
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Vectorized math functions (
exp,log,sigmoid,tanh) are now accelerated on AArch64 (using NEON/SVE) and on FreeBSD/Darwin, where they previously used a slower scalar fallbackDocumentation entry for user-facing changes
Version info
26.4.1.322