mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
Merge f-ling32-int (03006f62ed): L32-SMALL's 8 GB reserve fix
This commit is contained in:
commit
f9f533c65f
1 file changed
+4
-1
@@ -855,7 +855,10 @@ int cmd_run(const RunOpts& o_in) {
|
||||
lo.map_experts = o.map_experts;
|
||||
lo.lock_mapped = o.lock_mapped;
|
||||
lo.device = o.device;
|
||||
lo.reserve_bytes = (1ull << 30) + static_cast<uint64_t>(o.ctx) * 576 * 2 * 7 + static_cast<uint64_t>(o.chunk) * 157184 * 4 + (700ull << 20);
|
||||
// the card must hold the trunk and this reserve; with scratch regrow in a tiered run the always-resident scratch is decode_rows rows, a prompt takes pool slots for the big chunk scratch only while it is prefilled
|
||||
// (a card of 8 GB could not start at chunk 2048: the logits buffer of the chunk alone is 1.3 GiB)
|
||||
const int reserve_rows = (tiered && plan.kv_rows > 0 && o.regrow()) ? std::min(o.chunk, o.decode_rows_opt) : o.chunk;
|
||||
lo.reserve_bytes = (1ull << 30) + static_cast<uint64_t>(o.ctx) * 576 * 2 * 7 + static_cast<uint64_t>(reserve_rows) * 157184 * 4 + (700ull << 20);
|
||||
if (!o.vis.file.empty() && (o.vis.backend == "gpu" || (o.vis.backend == "auto" && vision_default_backend(vision_gpu_total_bytes(o.device))[0] == 'g')))
|
||||
lo.reserve_bytes += 1600ull << 20; // the GPU picture encoder: ~830 MiB of weights plus the activations of one picture
|
||||
const double t0 = now_s();
|
||||
|
||||
Reference in new issue
Block a user