mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1454] [CLOSED] prefill: reuse embedding storage for half outputs #3466
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3466
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1454
Author: @W1nge
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:codex/prefill-embedding-reuse📝 Commits (1)
304f325prefill: reuse embedding storage for half outputs📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
src/prefill/prefill.cpp(+5 -3)📄 Description
Reuse the prompt embedding allocation for the later half output (
bo). Embedding gathers, image-row uploads, the last embedding consumer (gr_broadcast), output projections, MoE combine and HC writes are ordered onm.cs. A following chunk reloads its embeddings; a stage receivinghand_in_does not reademb. PLE embeddings retain their separate allocation.Remove the corresponding
boallocation frombytes_needed_implas well ascarve. This saveschunk * 2560 * sizeof(float)payload bytes (320 MiB at 32768 rows), with allocator rounding handled by the existing allocator. No new flags, default chunk changes, or numerical kernels. Independent of #1451.Validation: reviewed all
m.emb/m.boaccesses in current maind5ea713;prefill.cppcompiles with MSVC 19.44/CUDA 12.4 headers both without native/MMQ and with native/MMQ/fused enabled;git diff --checkpasses.Draft: this alias was part of the locally validated 32K fork, but this isolated upstream port has not had a full-model, peer/stage or other-backend runtime comparison. The allocation saving is not an isolated throughput measurement. No broader HC scratch overlay is included.
Validation update (2026-10-08): a complete current-main integration build including #1451, #1454, #1455, #1457 and #1465 passed four real IQ3_XXS model baseline/integration pairs on RTX 2080 Ti: default, GR_UNFUSED, PREFILL_BF16X2 and legacy RING_BYTES modes. Each used INT8 KV, 194 input tokens, two prefill chunks and 8 output tokens; all runs exited successfully and output IDs matched within each pair. A 256K configured-context startup and short generation also passed (this did not fill a 256K prompt). These are combined regression checks, not an isolated performance result or exhaustive state equality. Other hardware/backends remain untested. The earlier draft-only status reflected the absence of any current-main model run; now requesting review with these limits explicit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.