layer_split: check it before the start, accept a JSON list, say the format with an example (#644)

"layer_split" is the first layer of each later GPU ("24,36,42" for 4 GPUs), not a count of layers per card. A
value such as "24,16,12,12" failed the engine's check after the start began, and a JSON list reached the engine as
"[24, 16, 12, 12]".

- server.py layer_split_value: "auto" (default), a comma string or a JSON list of one rising number per GPU after the
  first, from 2; anything else stops the start with the format and an example for that many GPUs.
- The engine's message says the same, with the value it got.
- MULTI_GPU.md and setup's --layer-split help say it.
This commit is contained in:
Niko1221 committed 2026-10-03 18:14:23 +02:00
1 parent 502c7296c9
commit 5fc2afa9ce
5 files changed
+86 -7

No files matched your search

+3 -1
View File
@@ -1416,7 +1416,9 @@ int main(int argc, char** argv) {
}
if (!ok) {
std::fprintf(stderr, "strata generate: --layer-split K[,K2..]|auto needs --serve, rising K from 2, and one "
"distinct GPU per K in --split-device (1..%d; or 0 with one K: the same GPU)\n", n_dev - 1);
"distinct GPU per K in --split-device (1..%d; or 0 with one K: the same GPU). K is the "
"FIRST LAYER of each later GPU, not a count of layers per card: \"24,36,42\" for 4 "
"GPUs, not \"24,12,6,6\" (got \"%s\")\n", n_dev - 1, o.layer_split.c_str());
return 2;
}
}