A5 RTT die-preflight scheduler assignment (mode 3) - #8
Open
yanghaoran29 wants to merge 1 commit into
Open
Conversation
Probe die0/die1 AICore MMIO latency at startup to rank scheduler threads, then assign contiguous cluster blocks by measured affinity (mode 3). Also land host topo die-aware assignment, half-split AICore die mapping, and benchmark helpers for comparing main round-robin vs RTT placement. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
在 A5 1O+4S 下增加 device 侧 RTT die 预检(
SIMPLER_SCHED_AICORE_ASSIGNMENT_OVERRIDE=3):各 Scheduler 线程用 physical core id 探测 die0/die1 AICore MMIO 延迟,按avg(die0)-avg(die1)排序后将 logical exec 0–1 绑定 die0 半区、2–3 绑定 die1 半区,再连续块分核。对比基线为 main round-robin(mode 2:
cluster ci → sched (ci % 4))。Benchmark 环境
tensormap_and_ringbuffertools/benchmark_main_vs_mode3.sh→benchmark_rounds.shqwen3_14b_decodeAvg Effective/Avg Sched(us,来自[STRACE])全 suite(device 0,2026-08-21)
负值表示 RTT(mode 3)更快。
单样例深测:benchmark_bgemm Case0(device 0,20 轮)
相对 main(mode 2):RTT Effective −8.3%,Sched −8.6%。
结论
启用