Skip to content

fix(platform): centralize cache-line sizing - #831

Merged
luoxiaojian merged 1 commit into
alibaba:mainfrom
luoxiaojian:codex/cacheline-size-upstream-main
Oct 21, 2026
Merged

luoxiaojian merged 1 commit into
alibaba:mainfrom
luoxiaojian:codex/cacheline-size-upstream-main

Conversation

@luoxiaojian

Copy link
Copy Markdown
Collaborator

Define overridable AILEGO_CACHE_LINE_SIZE with a 128-byte Apple ARM64 default and a 64-byte default elsewhere. Use it for prefetch strides and budgets, cache isolation, aligned buffers, and in-memory vector layouts. Preserve fixed SIMD widths and on-disk layouts.

Keep zero-line prefetch a no-op and retain caller-side automatic line counts. Update parameter documentation and alignment/prefetch regression tests, including the latest Flat query-metadata cache isolation.

Validation: 170 regression tests on upstream/main (8397071), covering platform helpers, allocation, buffer storage, HNSW, Vamana, and Flat.

Comment thread src/core/algorithm/hnsw/hnsw_algorithm.cc Outdated
@luoxiaojian
luoxiaojian force-pushed the codex/cacheline-size-upstream-main branch 3 times, most recently from b05eb1a to 051e20c Compare October 20, 2026 09:43
Define overridable AILEGO_CACHE_LINE_SIZE with a 128-byte Apple ARM64
default and a 64-byte default elsewhere. Use it for prefetch strides and
budgets, cache isolation, aligned buffers, and in-memory vector layouts.
Preserve fixed SIMD widths and on-disk layouts.

Keep zero-line prefetch a no-op and retain caller-side automatic line
counts. Update parameter documentation and alignment/prefetch regression
tests, including the latest Flat query-metadata cache isolation.

Validation: 170 regression tests on upstream/main (8397071), covering
platform helpers, allocation, buffer storage, HNSW, Vamana, and Flat.
@luoxiaojian
luoxiaojian force-pushed the codex/cacheline-size-upstream-main branch from 051e20c to 01d0508 Compare October 20, 2026 09:49
@luoxiaojian
luoxiaojian merged commit 00d8e02 into alibaba:main Oct 21, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants