[PR #2607] [CLOSED] serve: the card-order line says how to try the engine's suggested split point in the same order (#2085) #4162

Closed
opened 2026-11-07 15:33:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2607
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: chief-serve/split-order-hint


📝 Commits (1)

  • 96ddbe6 serve: the card-order line says how to try the engine's suggested split point in the same order (#2085)

📊 Changes

3 files changed (+14 additions, -2 deletions)

View changed files

📝 docs/MULTI_GPU.md (+1 -1)
📝 serve/server.py (+4 -1)
📝 serve/test_server.py (+9 -0)

📄 Description

On #2085 (found while reading that report's --layer-split planner notes).

What it changes. With "layer_split": "auto", serve/server.py ordered_gpus() puts the faster card last
(#1352), so the engine gets the cards as, say, 2,0, and its NEAR TIE line (src/program/generate.cpp ~4320,
"To try the other: --layer-split K") counts K in that order. A manual layer_split keeps the order the config lists
(0,2), so a user who copied K got its layers on the other cards, with the slower card running the head. The
server's layer split: card order 2,0 (...) line now ends with to try the engine's --layer-split K in this order, list "gpu": [2, 0] with it, #2085, and docs/MULTI_GPU.md ("Card order with auto") says the same.

Which fix and why. The fix is the hint only, not reordering or translating K:

  • Reordering a manual split as well would move the layers of every hand-tuned split that exists today.
  • Translating K for two cards (K' = layers - K in the listed order) gives the same layer counts, but the head,
    draft and verify then run on the slower card, so it is not the placement the engine priced.
  • A manual split keeps the listed order (it returns before the reorder, the #1576 check included), so
    "gpu": [2, 0] with "layer_split": "K" gives the engine the same device order and K.

What it leaves alone. Every card order and every split (no placement changes). The line is printed only when
the order changes, as before.

How it was checked. serve/test_server.py GpuChoice.test_card_order: the reorder line names "gpu": [2, 0]
and the engine's suggestion, and a config listing [2, 0] with a manual K gets [2, 0] (fails on main, passes).
With the venv's Python, serve.test_server: OK. Python 3.14, Ubuntu (Linux 7.0); no GPU, no engine run.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2607 **Author:** [@qiuzan2001](https://github.com/qiuzan2001) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chief-serve/split-order-hint` --- ### 📝 Commits (1) - [`96ddbe6`](https://github.com/Niko1221/Strata/commit/96ddbe6e4a8607b7dbb3acc638e4d88279e5a1da) serve: the card-order line says how to try the engine's suggested split point in the same order (#2085) ### 📊 Changes **3 files changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/MULTI_GPU.md` (+1 -1) 📝 `serve/server.py` (+4 -1) 📝 `serve/test_server.py` (+9 -0) </details> ### 📄 Description On #2085 (found while reading that report's `--layer-split` planner notes). **What it changes.** With `"layer_split": "auto"`, `serve/server.py` `ordered_gpus()` puts the faster card last (#1352), so the engine gets the cards as, say, `2,0`, and its NEAR TIE line (`src/program/generate.cpp` ~4320, "To try the other: --layer-split K") counts K in that order. A manual `layer_split` keeps the order the config lists (`0,2`), so a user who copied K got its layers on the other cards, with the slower card running the head. The server's `layer split: card order 2,0 (...)` line now ends with `to try the engine's --layer-split K in this order, list "gpu": [2, 0] with it, #2085`, and docs/MULTI_GPU.md ("Card order with auto") says the same. **Which fix and why.** The fix is the hint only, not reordering or translating K: - Reordering a manual split as well would move the layers of every hand-tuned split that exists today. - Translating K for two cards (K' = layers - K in the listed order) gives the same layer counts, but the head, draft and verify then run on the slower card, so it is not the placement the engine priced. - A manual split keeps the listed order (it returns before the reorder, the #1576 check included), so `"gpu": [2, 0]` with `"layer_split": "K"` gives the engine the same device order and K. **What it leaves alone.** Every card order and every split (no placement changes). The line is printed only when the order changes, as before. **How it was checked.** `serve/test_server.py` `GpuChoice.test_card_order`: the reorder line names `"gpu": [2, 0]` and the engine's suggestion, and a config listing `[2, 0]` with a manual K gets `[2, 0]` (fails on `main`, passes). With the venv's Python, `serve.test_server`: OK. Python 3.14, Ubuntu (Linux 7.0); no GPU, no engine run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:33:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4162
No description provided.