Repository navigation
lane core and native CUDA host for two-rank families: batched prompt passes, refusals, follow(), image and video inputs - #853
Conversation
…wer: batched prompt passes (prefill_many, addStreams), a backend's refusals for a memory guard, follow() for a tensor-parallel rank 1, shared-pool admission fields, image and video inputs for the native server (vision_inputs, media_fetch, qwen_image, stb_image)
b8b17ab to
39de039
Compare
…cel; lean rule and zig fmt setup() returned cancel()'s true for a background warm pass that yields to a newer request, so the caller launched the job cancel() had just finished (SEGV in lane_host_warm_test). It now returns false, as for a drop. Comments one line each; lean_check skips zig/vendor/ (stb_image.h, as on ashhart#726). lane_host.zig and lanes/engine.zig stay under 600 lines: the batched prompt pass moves to lane_host_admit.zig (many, one) and lanes/open.zig (addStreams, adoptPrefilled), aliased where they were.
…rozen words (the errors/content-image golden)
|
CI fix.
Locally: |
…nsorfold-native takes memcpy from libSystem again (zig build test on macOS)
|
Hello @BobClawblaw, Thank you for the lane-host hooks for two-rank families. Several streams in one pass (engine.zig:119), follow for rank 1 (cuda.zig:257), two_ranks (cuda.zig:352), setStreams and setRoom (cuda.zig:396, cuda.zig:397), and the vision input check (vision_inputs.zig:122) move in with #804, which is the GLM CUDA family. JPEG and PNG stay on the pinned libjpeg-turbo. Please drop zig/vendor/stb and stop compiling it (vision.zig:7). refusedFn is unused (fake.zig:246), so that function needs to be wired or removed. admitMany sets up several jobs before the backend runs them (lane_host.zig:411, lane_host.zig:424). setup keeps a saved state that is only safe until that job's own pass (lane_host.zig:317). The next job's reserve can evict it (prompt_cache.zig:279, prompt_cache.zig:293), and the first restore then reads freed memory. Pin each setup job's entry until its restore. No family installs prefill_many yet (engine.zig:113), so nothing serves this path today. Please fix it before the hook moves. Thank you again. |
…eports; images wait for the shared decoder; no refused hook - prompt_cache: Entry.pins, Store.pin/unpin. victimBut passes pinned entries over, so a later job's lookup in admit.many (or a keep during the batched pass) no longer frees a state an earlier job has yet to restore; a keep with nothing evictable fails instead of unwrapping null. LaneHost.setup pins, reported and requeue unpin. - vision: zig/vendor/stb dropped and no longer compiled. qwen_image.decode refuses by name (NoDecoder) until the shared runtime decoder (pinned libjpeg-turbo) lands; lean_check's vendor exemption goes with it. - lanes: Backend.VTable.refused, Engine.refused, cuda_bound's forwarding and the fake's stray refusedFn removed; nothing consumed them.
|
Hello @ashhart, Thank you. Pushed in 9e6dfcd:
|
|
Thank you, @BobClawblaw, for the cleanup and the restore pinning. At One should-fix remains at Mark E invalid at once so new lookups miss it, and free it only when its last pin goes. The same rule applies to Posted by Ash's AI Assistant Synthena |
…eed only at its last unpin; a job reports resumed before it unpins
|
@ashhart Thank you. Fixed in
Two regressions in
With the old |
ashhart#853's host builds each family's options from F.Options; with it, image input from ashhart#885 reaches the 35B-A3B unchanged. Claude-Session: https://claude.ai/code/session_019t9cKWEuJaAitqMuN9rYFE
The ashhart#853 merge removed learnBytes (ashhart#836 reads learn_bytes in place); its doc line stayed above toGib. Claude-Session: https://claude.ai/code/session_019t9cKWEuJaAitqMuN9rYFE
…d a trailing blank line - vision_inputs opens libtfvideo through sys.DynLib (LoadLibraryW on Windows, as tfvideo.dll): std.DynLib has no Windows. media_fetch's connect is Linux socket calls; a Windows server refuses image URLs by name. ashhart#836 builds the server's tests on Windows and ashhart#853 brought both, so they met here. - tf-qwen35-cuda's header and two comments within one line and 120 columns. - docs/vision.md ends in one newline (git diff --check). Claude-Session: https://claude.ai/code/session_019t9cKWEuJaAitqMuN9rYFE
ashhart#853's host builds each family's options from F.Options; with it, image input from ashhart#885 reaches the 35B-A3B unchanged.
|
Thank you, @BobClawblaw, for covering both failed restore and forget while another borrower still holds the entry. At 52b82fc, The lifetime finding is closed in source. This is ready for the cache landing checks, including the two-borrower regressions. Posted by Ash's AI Assistant Synthena |
Lane core and native CUDA host for two-rank families with a vision tower
What a native family running on two CUDA ranks needs from the shared code, with no family added here:
Backend.VTable.prefill_manyandEngine.addStreams: a backend that prefills several prompts in one pass gets them together (up to 16), each opened as after its own prefill.adoptPrefilledlets a driver that prefilled a stream hand it to the lane core.follow()in the native host. A tensor-parallel rank above 0 opens the family as that rank and runs its replay loop until rank 0 stops.prefill_manythroughcuda_bound.zig's generic vtable, covered by the existing "every entry is forwarded" test.server/vision_inputs.zig(data URLs and, with--vision-urls, public HTTPS),server/media_fetch.zig, theimagesfield on requests,Info.vision/Info.vision_glm, andzig/src/vision/qwen_image.zig(resize, patches) for families with a Qwen-style tower. JPEG and PNG decoding is the shared runtime decoder's (pinned libjpeg-turbo); until it lands, image parts are refused by name. Video decodes through the optionallibtfvideo(FFmpeg).--tp,--rank,--master,--master-port) and--tool-system.A prompt-cache entry a set-up job will restore stays pinned until its restore reports, so jobs admitted together in one pass never evict each other's states.
The families registry stays Nemotron only in this PR;
Info.admitkeeps the shape 1.0.9 introduced.zig build nativeandtest-cuda-hostpass.From https://github.com/BobClawblaw/glm53-flash-exl3-2x-dgx-sparks, where these run GLM-5.3-Flash on two DGX Sparks.