Repository navigation
core: elastic expert cache via CUDA VMM and on-demand GPU vision lifecycle - #37
code-martin wants to merge 1 commit into
Conversation
…ision - Replace static cudaMalloc with CUDA Virtual Memory Management (cuMemAddressReserve, cuMemCreate, cuMemMap/cuMemUnmap, cuMemSetAccess) - Add graceful fallback to cudaMalloc on devices without VMM support - Preserve base virtual address space across resizes so that CUDA graph captures and slot pointers remain valid - Add shrink() and grow() methods to ExpertCache - Add RESIZE <bytes> and GROW <bytes> interactive stdin commands to strata engine - Start StrataEngine before Vision in main() so the model sees full free VRAM - Keep vision encoder idle at server boot (0 bytes VRAM allocated during text gen) - Spawn strata-vision.exe on-demand inside Vision.encode() only while encoding - Coordinate engine VMM shrink (resize) before vision startup and grow after exit - Recover 500+ expert cache slots (~2460 vs 1840) on 10-12 GB GPUs
|
Thanks for the work and the write-ups. I went through all three carefully, and I'm not merging them as they are - here is why, so the useful parts can come back in a shape that fits: #37 (VMM cache + on-demand vision):
#38 (adaptive eviction): it mostly retunes the adaptation the engine already has (0.7 was already exponential decay), the new #39 (telemetry): it changes What I'd gladly take as small separate PRs against current main: the per-request decode hit rate (the DONE fields, the Monitor column), keeping the root checkpoint (only the first turn boundary), the |
|
Thank you for the detailed and constructive review, Niko! You're completely right on the architectural conflicts (especially regarding the 0.1.13 borrow path, the prefill overhead with per-turn checkpoints, and the existing adaptation engine). I will close these consolidated PRs and prepare small, clean, isolated PRs addressing exactly the parts you outlined against current main. |
…efill V100 (sm_70): FP32 tiled QSA block scores and a prompt-attention pipeline
Summary
This PR implements elastic resizing for the MoE expert cache using the CUDA Virtual Memory Management (VMM) API and introduces an on-demand lifecycle for GPU Vision models.
Key Changes
Testing