[PR #2385] [CLOSED] planner: rank auto layer splits for prompt pipelines #4018

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2385
Author: @MarsLuay
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/long-context-split-objective


📝 Commits (4)

  • c49639f planner: rank auto layer splits for prompt pipelines
  • 3e96348 planner: guard prompt gains against decode regressions
  • 0f18f6b planner: label tiny-stage objective correctly
  • b318adc Merge upstream/main into fix/long-context-split-objective

📊 Changes

4 files changed (+176 additions, -44 deletions)

View changed files

📝 docs/MULTI_GPU.md (+6 -3)
📝 include/strata/program/split_rules.hpp (+24 -0)
📝 src/program/generate.cpp (+137 -41)
📝 tests/program/split_rules_test.cpp (+9 -0)

📄 Description

Summary

  • Add --layer-split-objective interactive|prompt|decode for --layer-split auto.
  • Make the default interactive objective first select the legacy serial-decode optimum, then optimize the slowest prompt-pipeline stage only among placements whose predicted serial decode cost does not regress.
  • Keep prompt as an explicit unconstrained prompt-throughput priority and decode as the serial stage-sum ranking.
  • Preserve explicit layer splits unchanged and apply the same objective to four-stage candidate scoring.

This addresses the heterogeneous-GPU planner mismatch where maximizing cache coverage or prompt throughput can select a decode-slow split. The planner remains model-based and does not benchmark at startup. The decode guard is a prediction constraint, not a universal hardware guarantee.

Tracking issue: #2393

Related: #2052, #509, #2085

Measured evidence

These are actual same-host measurements from 2026-10-14 using Strata 0.1.40 (version-scoped evidence, not a claim about current 0.1.44 throughput): RTX 3080 Ti + Tesla V100, SC117 IQ3_S, 262,144 context, 259,841-token prompt, int8, 32K KV resident, speculative decoding 4, and no prompt reuse.

planner/config prompt time prompt rate decode cache hit
Before: --layer-split auto 228.6 s 1,136.7 tok/s 31.4 tok/s 90.9%
Reference: explicit balanced --layer-split 24 169.2 s 1,535.4 tok/s 28.7 tok/s 78.1%

The balanced split reduced prompt time by 26.0% and improved prompt throughput by 35.1%, despite its lower cache-hit percentage. These measurements motivate the prompt objective; they are not post-PR binary results.

A fresh 128K request was also run against the already-running 0.1.40 runtime with explicit balanced --layer-split 24: 124,631 prompt tokens, 76.91 s prompt time, 1,620.5 prompt tok/s, 7.86 s decode, 32.6 decode tok/s, 74.5% cache hit, no prompt reuse. This is version-scoped runtime remeasurement only; it does not validate this unbuilt PR head.

Validation

  • cmake --build build-pr --config Debug --target split_rules_test
  • ctest --test-dir build-pr -C Debug --output-on-failure -R '^(split_rules_test|share_rules_test|host_limits_test|arch_defaults_test|batch_read_test|batch_groups_test|split_ring_test|draft_kv_plan_test|coupled_draft_test|controller_test|message_boundary_test|conv_cache_test)$' — 12/12 passed
  • git diff --check

🔄 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/2385 **Author:** [@MarsLuay](https://github.com/MarsLuay) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/long-context-split-objective` --- ### 📝 Commits (4) - [`c49639f`](https://github.com/Niko1221/Strata/commit/c49639f83cb727ee763401651ad35bed99d7415f) planner: rank auto layer splits for prompt pipelines - [`3e96348`](https://github.com/Niko1221/Strata/commit/3e963486e07774c716740585ea3a1d4eaee997c6) planner: guard prompt gains against decode regressions - [`0f18f6b`](https://github.com/Niko1221/Strata/commit/0f18f6b9db2eb0d31177ae31fecb8b402e1bb5dc) planner: label tiny-stage objective correctly - [`b318adc`](https://github.com/Niko1221/Strata/commit/b318adc2b14536f1d1d00a2a0e65d9edc74c0a3d) Merge upstream/main into fix/long-context-split-objective ### 📊 Changes **4 files changed** (+176 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `docs/MULTI_GPU.md` (+6 -3) 📝 `include/strata/program/split_rules.hpp` (+24 -0) 📝 `src/program/generate.cpp` (+137 -41) 📝 `tests/program/split_rules_test.cpp` (+9 -0) </details> ### 📄 Description ## Summary - Add `--layer-split-objective interactive|prompt|decode` for `--layer-split auto`. - Make the default `interactive` objective first select the legacy serial-decode optimum, then optimize the slowest prompt-pipeline stage only among placements whose predicted serial decode cost does not regress. - Keep `prompt` as an explicit unconstrained prompt-throughput priority and `decode` as the serial stage-sum ranking. - Preserve explicit layer splits unchanged and apply the same objective to four-stage candidate scoring. This addresses the heterogeneous-GPU planner mismatch where maximizing cache coverage or prompt throughput can select a decode-slow split. The planner remains model-based and does not benchmark at startup. The decode guard is a prediction constraint, not a universal hardware guarantee. Tracking issue: #2393 Related: #2052, #509, #2085 ## Measured evidence These are actual same-host measurements from 2026-10-14 using Strata **0.1.40** (version-scoped evidence, not a claim about current 0.1.44 throughput): RTX 3080 Ti + Tesla V100, SC117 IQ3_S, 262,144 context, 259,841-token prompt, `int8`, 32K KV resident, speculative decoding 4, and no prompt reuse. | planner/config | prompt time | prompt rate | decode | cache hit | |---|---:|---:|---:|---:| | **Before:** `--layer-split auto` | 228.6 s | 1,136.7 tok/s | 31.4 tok/s | 90.9% | | **Reference:** explicit balanced `--layer-split 24` | **169.2 s** | **1,535.4 tok/s** | **28.7 tok/s** | 78.1% | The balanced split reduced prompt time by 26.0% and improved prompt throughput by 35.1%, despite its lower cache-hit percentage. These measurements motivate the prompt objective; they are not post-PR binary results. A fresh 128K request was also run against the already-running **0.1.40** runtime with explicit balanced `--layer-split 24`: 124,631 prompt tokens, 76.91 s prompt time, 1,620.5 prompt tok/s, 7.86 s decode, 32.6 decode tok/s, 74.5% cache hit, no prompt reuse. This is version-scoped runtime remeasurement only; it does not validate this unbuilt PR head. ## Validation - `cmake --build build-pr --config Debug --target split_rules_test` - `ctest --test-dir build-pr -C Debug --output-on-failure -R '^(split_rules_test|share_rules_test|host_limits_test|arch_defaults_test|batch_read_test|batch_groups_test|split_ring_test|draft_kv_plan_test|coupled_draft_test|controller_test|message_boundary_test|conv_cache_test)$'` — 12/12 passed - `git diff --check` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:30 +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#4018
No description provided.