Repository navigation
Conversation
This was referenced Nov 15, 2026
alexey-milovidov
approved these changes
Nov 15, 2026
Contributor
|
Workflow [PR], commit [be9df66] Summary: ❌
AI ReviewSummaryPR #131762, reviewed at Missing context / blind spots
Final VerdictStatus: ✅ Approve. No code changes requested; the source trace and reported compiler/probe checks support this narrowly scoped fix. |
alexey-milovidov
added a commit
that referenced
this pull request
Nov 15, 2026
#119685 was reverted in #131765 because the `arm_release` binary died with SIGILL on cores without `FEAT_PAuth` (Graviton2, Ampere Altra) on the first SimSIMD call: SimSIMD compiles its CPU probe `_simsimd_capabilities_arm` and five bf16 NEON kernels for ARMv8.3+, where clang folds `autiasp; ret` into `retaa`, which is not in the `NOP` space. Build `_simsimd` with `-mbranch-protection=none` (the same fix as #131762). Compiled with the `arm_release` flags, `c/lib.c` goes from 7 `retaa` to 0. Add a check to the `arm_release` compatibility check that scans the code sections of the packaged binary for `retaa` and `retab` and names the functions through `system.symbols`. A test run on Graviton3 would never notice the next such case. On the `arm_release` package of #131745 (pac-ret on) it reports exactly the 6 SimSIMD functions; on that of d88a8f1 (the master commit before #119685) it passes. Closes: #131748 Related: #131762 Related: #131765 Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov
added a commit
that referenced
this pull request
Nov 15, 2026
Building all of `_simsimd` with `-mbranch-protection=none` broke the `arm_release` link: a callee whose branch protection differs from the caller's is not inlined, so ThinLTO stopped inlining `simsimd_bf16_to_f32` from `c/lib.c` into the `vectorize(enable)` loops of usearch, and `-Wpass-failed` turned "loop not vectorized" into a link error (also in #131762). Reproduced with a two-file ThinLTO example on clang 21. Revert that and bump `contrib/SimSIMD` to ClickHouse/SimSIMD@7cd5fbe8bb08 (branch `pac-ret-no-retaa`, on top of the previous pin e81e1c2de244), which adds `branch-protection=none` to the ARMv8.3+ targets only: the CPU probe (`arch=armv8.5-a+sve`) and the bf16 kernels (`arch=armv8.6-a+...`). Compiled with the `arm_release` flags plus `pac-ret`, `c/lib.c` has 0 `retaa` (7 before) and 102 signed functions (109 before). CI report: https://github.com/ClickHouse/ClickHouse/actions/runs/43723362796/job/132846622615 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
|
Superseeded by #131784 and also a step in the wrong direction |
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.
Closes: #131748
Related: #119685
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
With
-mbranch-protection=pac-ret, clang turnsautiasp; retintoretaain functions built for ARMv8.3 or newer. SimSIMD's CPU probe_simsimd_capabilities_armis built undertarget("arch=armv8.5-a+sve"), so it ends inretaaand gets SIGILL on cores withoutFEAT_PAuth(Graviton2, Ampere Altra) the first time avector_similarityindex is built or a*Transposeddistance function runs. This builds_simsimdwith-mbranch-protection=none.I checked it with the current master aarch64 build under
qemu-aarch64 -cpu neoverse-n1: theINSERTfrom the issue andL2DistanceTransposedboth die with SIGILL at_simsimd_capabilities_arm. Those 6 SimSIMD functions are the only places withretaain the binary. When I buildc/lib.cwith the same flags plus this one, noretaais left, and the probe returns on both N1 and V1.Workflow [PR]
Sync PR [sync-upstream/pr/131762]