Files
Strata/include/strata/program
Niko1221 7ee50cc8c7 split: price each stage's prompt loan on its own card (#5722)
Prefill::bytes_needed answers for the current device (prefill.cpp fused_ring
decides the fused layout per card), and part_slots / ring_room priced every
participant of a layer split with whatever device was current, CUDA0's. On an
RTX 5080 + RTX 4090 split the 4090's loan was 2882 MiB for buffers that take
3014 MiB there, and its prompt path stepped down to small chunks.

New helper split_ring.hpp split_part_figure(on_device, dev, fn) evaluates
fn() with the participant's device current (OnDevice, put back after);
generate.cpp part_slots and ring_room's bytes_needed_no_ring go through it.
CUDA0's own part (dev -1) is priced as before. On like cards every device
gives the same figure, so the numbers are unchanged.

Test: tests/program/split_part_price_test.cpp (cpu-check, faked devices).
With the old pricing: CUDA1 lent 2880 MiB for 3014 MiB of buffers, reads
6144-token chunks (fail); now lent 3016 MiB, reads 8192; 2 and 4 like cards
give identical slot counts over the 256..32768 chunk grid. No mixed-card
machine was available: no real mixed-card run backs this.
2026-11-10 18:30:45 +01:00
..