Skip to content

feat(memory): add shared budget foundations and bounded training workspaces - #830

Open
iaojnh wants to merge 6 commits into
alibaba:mainfrom
iaojnh:codex/memory-pr1-foundation
Open

iaojnh wants to merge 6 commits into
alibaba:mainfrom
iaojnh:codex/memory-pr1-foundation

Conversation

@iaojnh

@iaojnh iaojnh commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared memory-budget primitives and account for retained allocations, page-pool metadata, and cache/storage lifetimes.
  • Reduce training copies and introduce reusable, buffer-backed workspaces for sampling, KMeans, hierarchical clustering, and PQ/OPQ training.
  • Add regression coverage for budget exhaustion, cleanup, ownership, and training-result consistency.

This is the first part of the memory-management changes. Index-specific integration and DB-layer budgeting are left for follow-up PRs. No local benchmark scripts or acceptance documents are included.

Validation

  • All 38 test targets passed on macOS.
  • The cache-competition regression passed 100 repetitions.
  • Linux and Windows validation pending CI.

Document and narrowly suppress required allocator rebind naming and intentional pointer-slot sizing. Format the Windows file reader regression test without changing behavior.
Preserve cache-line-aligned batch arenas with budgeted allocation and shared result ownership.
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.

1 participant