Repository navigation
feat(cli): add --simd flag for runtime SIMD level override - #3743
Merged
Merged
Conversation
oferchen
force-pushed
the
feat/simd-cli-flag-1825
branch
2 times, most recently
from
May 6, 2026 12:16
c5e0c6c to
e3f2a00
Compare
Adds a process-wide SIMD level override that lets callers pin checksum dispatch to a specific instruction-set family (auto, avx512, avx2, sse4, neon, none) via the new --simd CLI flag. The override is consulted by the rolling-checksum dispatcher (x86 AVX2/SSE2 path and aarch64 NEON path) and the MD5 batch dispatcher before CPUID, so callers can force a narrower backend even on hosts that advertise wider SIMD.
oferchen
force-pushed
the
feat/simd-cli-flag-1825
branch
from
May 6, 2026 17:45
042727b to
41f48aa
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
* feat(cli): add --simd flag for runtime SIMD level override Adds a process-wide SIMD level override that lets callers pin checksum dispatch to a specific instruction-set family (auto, avx512, avx2, sse4, neon, none) via the new --simd CLI flag. The override is consulted by the rolling-checksum dispatcher (x86 AVX2/SSE2 path and aarch64 NEON path) and the MD5 batch dispatcher before CPUID, so callers can force a narrower backend even on hosts that advertise wider SIMD. * fix(cli): use format! in rsync_error! to avoid macro ambiguity * fix(cli): inline format args to satisfy clippy uninlined_format_args * fix(checksums): inline format args to satisfy clippy uninlined_format_args
3 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* feat(cli): add --simd flag for runtime SIMD level override Adds a process-wide SIMD level override that lets callers pin checksum dispatch to a specific instruction-set family (auto, avx512, avx2, sse4, neon, none) via the new --simd CLI flag. The override is consulted by the rolling-checksum dispatcher (x86 AVX2/SSE2 path and aarch64 NEON path) and the MD5 batch dispatcher before CPUID, so callers can force a narrower backend even on hosts that advertise wider SIMD. * fix(cli): use format! in rsync_error! to avoid macro ambiguity * fix(cli): inline format args to satisfy clippy uninlined_format_args * fix(checksums): inline format args to satisfy clippy uninlined_format_args
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.
Summary
SimdLevel::{Auto, Avx512, Avx2, Sse4, Neon, None}) inchecksums::cpu_features, backed by a lock-freeAtomicU8so dispatch reads stay zero-cost.feature_allowedbefore activating a backend.--simd=<auto|avx512|avx2|sse4|neon|none>. The CLI installs the override exactly once at workflow start and surfaces a clear diagnostic on conflicting installs.avx-512,sse4.1,scalar, ...) and integration tests incrates/checksums/tests/simd_override.rsthat verify pinning forces the expected dispatcher backend and thatnonereproduces scalar parity withauto.Test plan
cargo nextest run -p checksums --test simd_override(CI)cargo nextest run -p cli -E 'test(simd_)'(CI)--helpandSUPPORTED_OPTIONS_LISTadvertise the new flag (CI help golden)