Inspect · Source & workspace
Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0093–#0093
echo <val>ls -l -a <val> <n> > <path>head -n <n>Kimi K3 · Serving
Online saturation throughput 1dev · Implementation Optimization
01 / PROCESS MAP
Compare agents on one time axis; overlapping spans line up vertically. Select an agent or bar to inspect its events.
Time starts at the first recorded activity. Select a bar or agent to open its events. Bars span the first and last recorded observation, including gaps; colored ticks mark tool calls. A hollow diamond marks a delegation whose child timing is unavailable.
02 / EVENT SEQUENCE
Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.
Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>. Each branch belongs to its named agent. Expand a delegation to inspect its child; branches can run concurrently. Call numbers preserve source order, not a serial schedule. Times are relative to the first recorded activity.
Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0093–#0093
echo <val>ls -l -a <val> <n> > <path>head -n <n>Requested file and log inspection related to task requirements.
2 calls · #0094–#0095
Read <path>Requested file and log inspection related to runtime processes.
1 call · #0096–#0096
cd <path><command> <args>cat <val>Requested file and log inspection related to benchmark & validation setup.
1 call · #0097–#0097
cd <path><command> <args>cat <val>Requested file and log inspection, environment setup or inspection and source searches related to source & workspace.
8 calls · #0098–#0105
Read <path>envgrep -E <val>sortecho <flag>cat <val> <n> > <path>head -n <n>cd <path>git log --oneline <flag> <args>git status <flag>headpython3 -c <script> <n> >& <path>tail -n <n>Requested workspace inspection and file and log inspection related to task requirements.
1 call · #0106–#0106
ls <path> <path> <path> <n> > <path>echo <flag>head -c <n> <path>Requested script or workload execution related to task requirements.
1 call · #0107–#0107
cd <path>python3 -c <script>Requested task coordination related to source & workspace.
1 call · #0108–#0108
Update task list <tasks>Requested script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0109–#0109
cd <path>bash <script> > <path> <n> >& <path>echo <val>tail -n <n> <path>echo <flag>cat <path> <n> > <path>python3 -m <module>head -n <n>Requested task coordination related to source & workspace.
1 call · #0110–#0110
Delegate <task>Delegated by Main agent at call #0110. Observed activity +04:48–+24:58.
Requested source searches related to runtime processes.
1 call · #0001–#0001
Search <pattern> <path>Requested workspace inspection, source searches and file and log inspection related to source & workspace.
10 calls · #0002–#0011
Find <pattern>Search <pattern> <path>Read <path>ls -R <path>head -n <n>Requested source searches related to batching & scheduling.
1 call · #0012–#0012
Search <pattern> <path>Requested file and log inspection related to source & workspace.
1 call · #0013–#0013
Read <path>Requested source searches and file and log inspection related to dependencies & build setup.
2 calls · #0014–#0015
Search <pattern> <path>Read <path>Requested source searches related to attention kernels.
1 call · #0016–#0016
Search <pattern> <path>Requested file and log inspection related to runtime processes.
3 calls · #0017–#0019
Read <path>Requested file and log inspection and workspace inspection related to source & workspace.
2 calls · #0020–#0021
Read <path>ls <path>Requested file and log inspection and source searches related to attention kernels.
8 calls · #0022–#0029
wc -l <path> <path> <path> <path>Search <pattern> <path>Read <path>Requested file and log inspection related to source & workspace.
1 call · #0030–#0030
Read <path>Requested source searches related to attention kernels.
1 call · #0031–#0031
Search <pattern> <path>Requested source searches related to batching & scheduling.
1 call · #0032–#0032
Search <pattern> <path>Requested file and log inspection related to source & workspace.
1 call · #0033–#0033
Read <path>Requested file and log inspection related to batching & scheduling.
1 call · #0034–#0034
Read <path>Requested source searches related to runtime processes.
1 call · #0035–#0035
Search <pattern> <path>Requested source searches and file and log inspection related to batching & scheduling.
2 calls · #0036–#0037
Search <pattern> <path>Read <path>Requested file and log inspection related to runtime processes.
1 call · #0038–#0038
Read <path>Requested file and log inspection related to dependencies & build setup.
1 call · #0039–#0039
Read <path>Requested file and log inspection related to batching & scheduling.
1 call · #0040–#0040
Read <path>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0041–#0041
ls <path> <n> > <path>find <val> -maxdepth <n> -type <val>head -n <n>Requested workspace inspection related to attention kernels.
1 call · #0042–#0042
ls <path> <path> <path> <path> <path> <n> > <path>Requested source searches related to source & workspace.
1 call · #0043–#0043
Search <pattern> <path>Requested source searches and file and log inspection related to attention kernels.
3 calls · #0044–#0046
Search <pattern> <path>Read <path>Requested source searches related to source & workspace.
2 calls · #0047–#0048
Search <pattern> <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0049–#0049
grep -r -n <val> <path>headsed -n <val> <path>Requested file and log inspection related to runtime processes.
1 call · #0050–#0050
Read <path>Requested source searches and file and log inspection related to source & workspace.
4 calls · #0051–#0054
Search <pattern> <path>Read <path>Requested source searches related to device memory.
1 call · #0055–#0055
Search <pattern> <path>Requested source searches related to source & workspace.
2 calls · #0056–#0057
Search <pattern> <path>Requested file and log inspection related to device memory.
1 call · #0058–#0058
Read <path>Requested file and log inspection related to batching & scheduling.
1 call · #0059–#0059
Read <path>Requested source searches related to source & workspace.
1 call · #0060–#0060
Search <pattern> <path>Requested file and log inspection related to runtime processes.
1 call · #0061–#0061
Read <path>Requested source searches related to source & workspace.
1 call · #0062–#0062
Search <pattern> <path>Requested source searches related to batching & scheduling.
1 call · #0063–#0063
Search <pattern> <path>Requested file and log inspection related to source & workspace.
3 calls · #0064–#0066
Read <path>Requested source searches related to attention kernels.
1 call · #0067–#0067
Search <pattern> <path>Requested source searches related to source & workspace.
2 calls · #0068–#0069
Search <pattern> <path>Requested source searches related to attention kernels.
1 call · #0070–#0070
Search <pattern> <path>Requested source searches related to source & workspace.
1 call · #0071–#0071
Search <pattern> <path>Requested file and log inspection related to attention kernels.
1 call · #0072–#0072
Read <path>Requested file and log inspection, source searches and workspace inspection related to source & workspace.
5 calls · #0073–#0077
Read <path>Search <pattern> <path>Find <pattern>Requested source searches and file and log inspection related to attention kernels.
2 calls · #0078–#0079
Search <pattern> <path>Read <path>Requested source searches related to source & workspace.
1 call · #0080–#0080
Search <pattern> <path>Requested file and log inspection related to attention kernels.
3 calls · #0081–#0083
Read <path>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
4 calls · #0084–#0087
Search <pattern> <path>Read <path>Find <pattern>Requested source searches related to batching & scheduling.
1 call · #0088–#0088
Search <pattern> <path>Requested file and log inspection and source searches related to attention kernels.
4 calls · #0089–#0092
Read <path>Search <pattern> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0111–#0111
tail -n <n> <path>echo <val>python3 -m <module> <path> <n> > <path>head -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0112–#0112
cd <path>bash <script> > <path> <n> >& <path>echo <val>Requested file and log inspection and workspace inspection related to source & workspace.
4 calls · #0113–#0116
Read <path>cd <path>find <path> -name <val> -o -name <val>headls <path>Requested file and log inspection and source searches related to attention kernels.
2 calls · #0117–#0118
cd <path>wc -l <path>grep -n <val> <path>head -n <n>Read <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0119–#0119
tail -c <n> <path> <n> > <path>ls -l -a <path> <n> > <path>Requested file and log inspection related to source & workspace.
1 call · #0120–#0120
tail -n <n> <path>Requested script or workload execution related to attention kernels.
1 call · #0121–#0121
cd <path>python3 - <script>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0122–#0123
cd <path>grep -n <val> <path>head -n <n>Read <path>Requested file and log inspection related to attention kernels.
1 call · #0124–#0124
Read <path>Requested source searches, file and log inspection and workspace inspection related to source & workspace.
2 calls · #0125–#0126
cd <path>grep -r -n <val> <path> <n> > <path>headfind <val> -name <path>xargs <val> <flag> <args>Read <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0127–#0127
tail -c <n> <path>echols <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0128–#0128
cd <path>python3 -c <script>Requested task coordination related to source & workspace.
1 call · #0129–#0129
Update task list <tasks>Requested script or workload execution, file and log inspection and runtime inspection related to device memory.
1 call · #0130–#0130
which <val> <n> > <path>python3 -c <script> <n> >& <path>head -n <n>npu-smi info <n> > <path>Requested code edits related to runtime processes.
1 call · #0131–#0131
Write <path>Requested workspace file updates, script or workload execution and source searches related to runtime processes.
2 calls · #0132–#0133
mkdir -p <path>cd <path>nohup <val> <path> > <path> <n> >& <path>echo <val><command> <args>grep -q <val>sleep <n>tail -n <n> <path>Requested runtime inspection, source searches and file and log inspection related to source & workspace.
1 call · #0134–#0134
ps <flag>grep -i <val>grep -v <val>awk <val>Requested environment setup or inspection, script or workload execution and execution waits related to batching & scheduling.
2 calls · #0135–#0136
cd <path>env <vars>nohup <val> -m <val> <flag> <args>echo <val>sleep <n><command> <args>tail -n <n>sort <flag> <args>head -n <n>awk <val> <val>awk <flag> <args>sortuniq -csort <flag>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0137–#0137
cd <path>head -n <n> <val>cut <flag>echo <val>python3 - <script>Requested file and log inspection related to attention kernels.
1 call · #0138–#0138
Read <path>Requested code edits related to source & workspace.
1 call · #0139–#0139
Write <path>Requested execution waits, file and log inspection and workspace inspection related to source & workspace.
1 call · #0140–#0140
sleep <n>tail -c <n> <path>ls -l -a <path> <n> > <path>Requested environment setup or inspection and source searches related to source & workspace.
1 call · #0141–#0141
cd <path>env <vars> python3 <script> <n> >& <path>grep -v <val>Requested script or workload execution related to batching & scheduling.
1 call · #0142–#0142
cd <path>python3 - <script>Requested script or workload execution and file and log inspection related to attention kernels.
1 call · #0143–#0143
python3 -c <script> <n> > <path>head -n <n>Requested environment setup or inspection, script or workload execution and execution waits related to batching & scheduling.
1 call · #0144–#0144
cd <path>env <vars>nohup <val> -m <val> <flag> <args>sleep <n><command> <args>head <flag>echo <val>tail -n <n>Requested script or workload execution related to batching & scheduling.
1 call · #0145–#0145
cd <path>python3 - <script>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0146–#0146
cd <path>grep -c <val> <val>head -n <n> <val>cut <flag>grep -o <val> <val>sortuniq -cheadRequested source searches, file and log inspection and workspace inspection related to attention kernels.
3 calls · #0147–#0149
cd <path>grep -r -n <val> <path> <n> > <path>headgrep -r -n <val> -A <n> <path> <n> > <path>head -n <n>find <val> -name <path>xargs <val> <flag> <args>grep -r -l -n <val> <path> --include <path> <n> > <path>grep -n <val> <path>grep -n <val> -A <n> <path>sed -n <val>Requested file and log inspection related to source & workspace.
1 call · #0150–#0150
Read <path>Requested workspace inspection, file and log inspection and source searches related to attention kernels.
2 calls · #0151–#0152
cd <path>ls <path>sed -n <val> <path>grep -n <val> <path>Requested environment setup or inspection, script or workload execution and execution waits related to batching & scheduling.
1 call · #0153–#0153
cd <path>env <vars>nohup <val> -m <val> <flag> <args>sleep <n><command> <args>head <flag>tail -n <n>Requested script or workload execution related to attention kernels.
1 call · #0154–#0154
cd <path>python3 - <script>Requested file and log inspection, workspace inspection and source searches related to batching & scheduling.
3 calls · #0155–#0157
cd <path>sed -n <val> <path> <n> > <path>find <path> -name <path>echo <val>sed -n <val> <path>grep -r -n <val> <path> <path> <n> > <path>grep -v <val>head -n <n>headRequested file and log inspection related to source & workspace.
2 calls · #0158–#0159
cd <path>sed -n <val> <path>Requested source searches, file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0160–#0160
cd <path>grep -E <val> <val>grep <flag> <args>awk <val>uniq -cpython3 -c <script>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0161–#0161
cd <path>grep <flag> <args>grep -E <val> <val>tail -n <n>Requested script or workload execution related to batching & scheduling.
1 call · #0162–#0162
cd <path>python3 - <script>Requested file and log inspection related to attention kernels.
2 calls · #0163–#0164
Read <path>Requested file and log inspection related to source & workspace.
1 call · #0165–#0165
Read <path>Requested code edits related to source & workspace.
1 call · #0166–#0166
Edit <path>Requested process termination, execution waits and runtime inspection related to runtime processes.
1 call · #0167–#0167
pkill -f <val>sleep <n>pgrep -f <val>headecho <val>sed -i <path> <path>tail -n <n> <path>Requested runtime inspection, file and log inspection and source searches related to runtime processes.
1 call · #0168–#0168
pgrep -f <val>headecho <flag>ps <flag>grep -c <val>Requested process termination, execution waits and runtime inspection related to device memory.
1 call · #0169–#0169
kill <flag> <args>sleep <n>pgrep -f <val>headecho <val>npu-smi infogrep -E <val>head -n <n>Requested script or workload execution, source searches and execution waits related to runtime processes.
1 call · #0170–#0170
cd <path>nohup <val> <path> > <path> <n> >& <path>echo <val><command> <args>grep -q <val>sleep <n>Requested script or workload execution and source searches related to task requirements.
1 call · #0171–#0171
cd <path>python3 -m <module> <flag> <args>grep -E <val>Requested script or workload execution related to batching & scheduling.
1 call · #0172–#0172
cd <path>python3 - <script>Requested script or workload execution related to batching & scheduling.
3 calls · #0173–#0175
cd <path>python3 - <script>Requested file and log inspection related to source & workspace.
1 call · #0176–#0176
Read <path>Requested file and log inspection and source searches related to batching & scheduling.
3 calls · #0177–#0179
Read <path>cd <path>sed -n <val> <path>echo <val>grep -n <val> <path>head -n <n>Requested code edits related to source & workspace.
3 calls · #0180–#0182
Edit <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0183–#0183
cd <path>grep -r -n <val> --include <path>headhead -n <n>Requested file and log inspection related to runtime processes.
1 call · #0184–#0184
cd <path>sed -n <val> <path>Requested file and log inspection related to batching & scheduling.
1 call · #0185–#0185
Read <path>Requested code edits related to batching & scheduling.
1 call · #0186–#0186
Edit <path>Requested code edits, script or workload execution and execution waits related to attention kernels.
3 calls · #0187–#0189
Edit <path>sed -i <path> <path>cd <path>python3 -c <script>nohup <val> <path> > <path> <n> >& <path>sleep <n>echo <val>Requested task coordination related to source & workspace.
1 call · #0190–#0190
Update task list <tasks>Requested source searches, execution waits and file and log inspection related to runtime processes.
1 call · #0191–#0191
<command> <args>grep -q <val>sleep <n>tail -n <n> <path>cut <flag>Requested script or workload execution and source searches related to task requirements.
1 call · #0192–#0192
cd <path>python3 -m <module> <flag> <args>grep -E <val>Requested file and log inspection related to batching & scheduling.
1 call · #0193–#0193
Read <path>Requested code edits related to batching & scheduling.
2 calls · #0194–#0195
Edit <path>Requested code edits related to source & workspace.
2 calls · #0196–#0197
Edit <path>Requested file and log inspection related to source & workspace.
1 call · #0198–#0198
Read <path>Requested code edits related to source & workspace.
4 calls · #0199–#0202
Edit <path>Requested source searches, file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0203–#0203
cd <path>grep -n <val> <path>head -n <n>python3 -c <script>Requested code edits related to source & workspace.
1 call · #0204–#0204
Edit <path>Requested process termination, execution waits and runtime inspection related to runtime processes.
1 call · #0205–#0205
pkill -f <val> <n> > <path>sleep <n>pgrep -f <val>xargs -r <val> <flag> <args>sed -i <path> <path>cd <path>nohup <val> <path> > <path> <n> >& <path>echo <val>Requested runtime inspection and source searches related to runtime processes.
1 call · #0206–#0206
pgrep -f <val>echo <flag>grep -c <val> <path>Requested runtime inspection, source searches and file and log inspection related to runtime processes.
1 call · #0207–#0207
ps <flag>grep -E <path>grep -v <val>awk <val>headRequested source searches and code edits related to runtime processes.
1 call · #0208–#0208
grep -n <val> <path>sed -i <path> <path>grep <val> <path>Requested script or workload execution, source searches and execution waits related to runtime processes.
1 call · #0209–#0209
cd <path>nohup <val> <path> > <path> <n> >& <path>echo <val><command> <args>grep -q <val>sleep <n>Requested script or workload execution, source searches and file and log inspection related to task requirements.
1 call · #0210–#0210
cd <path>python3 -m <module> <flag> <args>grep -E <val>echo <val>grep -E <val> <path>tail -n <n>Requested source searches and file and log inspection related to runtime processes.
1 call · #0211–#0211
grep -E <val> <path>tail -n <n>echo <val>grep <val> <path>awk <flag> <args>Requested script or workload execution, execution waits and file and log inspection related to device memory.
1 call · #0212–#0212
cd <path>nohup <path> -m <val> <flag> <args>sleep <n><command> <args>awk <path>Requested runtime inspection and file and log inspection related to device memory.
1 call · #0213–#0213
npu-smi infosed -n <val>Requested file and log inspection and execution waits related to device memory.
1 call · #0214–#0214
<command> <args>awk <path>sleep <n>Requested code edits related to source & workspace.
1 call · #0215–#0215
Edit <path>Requested script or workload execution, file and log inspection and process termination related to runtime processes.
1 call · #0216–#0216
cd <path>python3 -c <script><command> <args>head <flag>kill <flag> <args>sleep <n>pgrep -f <val>xargs -r <val> <flag>nohup <val> <path> > <path> <n> >& <path>grep -q <val>Requested file and log inspection, process termination and execution waits related to device memory.
1 call · #0217–#0217
<command> <args>head <flag>echo <val>kill <flag> <args>sleep <n>pgrep -f <val>xargs -r <val> <flag>ps <flag>grep -c <val>npu-smi infogrep <val>Requested script or workload execution, source searches and execution waits related to runtime processes.
1 call · #0218–#0218
cd <path>nohup <val> <path> > <path> <n> >& <path><command> <args>grep -q <val>sleep <n>Requested script or workload execution, source searches and file and log inspection related to task requirements.
1 call · #0219–#0219
cd <path>python3 -m <module> <flag> <args>grep -E <val>grep -E <val> <path>tail -n <n>grep <val> <path>awk <flag> <args>Requested source searches and file and log inspection related to runtime processes.
1 call · #0220–#0220
grep -c <val> <path>grep <val> <path>tail -n <n>grep -i -E <val> <path>grep -v <val>Requested code edits related to source & workspace.
1 call · #0221–#0221
Edit <path>Requested file and log inspection, process termination and execution waits related to runtime processes.
1 call · #0222–#0222
<command> <args>head <flag>kill <flag> <args>sleep <n>pgrep -f <val>xargs -r <val> <flag> <args>sed -i <path> <path>cd <path>nohup <val> <path> > <path> <n> >& <path>grep -q <val>Requested script or workload execution, source searches and file and log inspection related to task requirements.
1 call · #0223–#0223
cd <path>python3 -m <module> <flag> <args>grep -E <val>grep <val> <path>awk <flag> <args>tail -n <n>Requested execution waits and file and log inspection related to batching & scheduling.
1 call · #0224–#0224
sleep <n><command> <args>head <flag>echo <val>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0225–#0225
cd <path>python3 - <script>Requested file and log inspection related to batching & scheduling.
1 call · #0226–#0226
cd <path>sed -n <val> <path>Requested file and log inspection, workspace inspection and source searches related to runtime processes.
1 call · #0227–#0227
tail -n <n> <path> <n> > <path>ls -l -a <path> <n> > <path>grep -i -E <val> <path>grep -v <val>tail -n <n>Requested execution waits related to source & workspace.
1 call · #0228–#0228
Wait for <task>Requested script or workload execution, source searches and file and log inspection related to runtime processes.
1 call · #0229–#0229
python3 -c <script>grep <val> <path>awk <flag> <args>tail -n <n>Requested file and log inspection and workspace inspection related to source & workspace.
2 calls · #0230–#0231
tail -n <n> <path>ls -l -a <path>tail -n <n>Read <path>Requested code edits related to source & workspace.
2 calls · #0232–#0233
Edit <path>Requested file and log inspection related to source & workspace.
1 call · #0234–#0234
Read <path>Requested code edits related to source & workspace.
2 calls · #0235–#0236
Edit <path>Requested code edits related to batching & scheduling.
2 calls · #0237–#0238
Edit <path>Requested source searches, script or workload execution and repository inspection related to attention kernels.
1 call · #0239–#0239
cd <path>grep -r -n <val> <path> <path>grep -v <val>python3 -c <script>git diff --statRequested repository inspection and task coordination related to source & workspace.
2 calls · #0240–#0241
cd <path>git diffUpdate task list <tasks>Requested file and log inspection, process termination and execution waits related to device memory.
1 call · #0242–#0242
<command> <args>head <flag>echo <val>kill <flag> <args>sleep <n>pgrep -f <val>xargs -r <val> <flag> <args>npu-smi infogrep <val>curl -s -m <n> <url> > <path> <n> >& <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0243–#0243
cd <path>bash <script> > <path> <n> >& <path>echo <val>python3 -c <script>Requested script or workload execution and execution waits related to source & workspace.
2 calls · #0244–#0245
python3 -c <script>Wait for <task>Requested script or workload execution related to benchmark & validation setup.
1 call · #0246–#0246
cd <path>bash <script> > <path> <n> >& <path>echo <val>python3 -c <script>Requested execution waits related to source & workspace.
1 call · #0247–#0247
Wait for <task>Requested repository inspection, script or workload execution and file and log inspection related to source & workspace.
2 calls · #0248–#0249
cd <path>git status <flag>echo <flag>bash <script> <n> >& <path>tail -n <n>Update task list <tasks>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 340db9201005fc64635bb25db1d2538f955761c3
@@ -430,7 +430,13 @@ class AscendAttnBackend(AttentionBackend): def init_forward_metadata(self, forward_batch: ForwardBatch): """Init the metadata for a forward pass.""" self.forward_metadata = ForwardMetadata()- seq_lens_max = forward_batch.seq_lens.max()+ # Use the host-side seq lens to size the block-table slice; a device+ # tensor slice bound would force a D2H sync in the middle of the+ # launch pipeline.+ if forward_batch.seq_lens_cpu is not None:+ seq_lens_max = int(forward_batch.seq_lens_cpu.max())+ else:+ seq_lens_max = forward_batch.seq_lens.max() if forward_batch.forward_mode.is_target_verify(): seq_lens_max += self.speculative_num_draft_tokens elif (@@ -459,9 +465,14 @@ class AscendAttnBackend(AttentionBackend): ) if forward_batch.extend_seq_lens is not None: self.forward_metadata.extend_seq_lens = forward_batch.extend_seq_lens- self.forward_metadata.extend_seq_lens_cpu_int = (- forward_batch.extend_seq_lens.cpu().int()- )+ if forward_batch.extend_seq_lens_cpu is not None:+ self.forward_metadata.extend_seq_lens_cpu_int = torch.as_tensor(+ np.asarray(forward_batch.extend_seq_lens_cpu), dtype=torch.int32+ )+ else:+ self.forward_metadata.extend_seq_lens_cpu_int = (+ forward_batch.extend_seq_lens.cpu().int()+ ) if forward_batch.seq_lens is not None: self.forward_metadata.seq_lens = forward_batch.seq_lens.int() else:@@ -12,6 +12,7 @@ non-NPU hosts. from __future__ import annotations +import logging import threading from contextlib import AbstractContextManager, contextmanager from functools import partial@@ -37,6 +38,8 @@ if TYPE_CHECKING: BaseCudaGraphRunner, ) +logger = logging.getLogger(__name__)+ class NPUCudaGraphBackend(BaseCudaGraphBackend): """One torch.npu.NPUGraph per shape; attention metadata captured@@ -166,17 +169,53 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): graph = self._graphs[shape_key] - def _update():- self._device_module.set_device(self._device_id)- graph.update(cpu_update_input=cpu_update_input)-- thread = threading.Thread(target=_update)- thread.start()+ self._get_update_worker()+ self._update_job = (graph, cpu_update_input)+ self._update_done.clear()+ self._update_req.set() graph.replay()- thread.join()+ self._update_done.wait() return self._outputs[shape_key] + def _get_update_worker(self):+ """Lazily create a persistent graph-update worker thread.++ Spawning a fresh ``threading.Thread`` per decode step costs tens of+ microseconds of host time plus lock churn; a persistent worker+ woken via Events is much cheaper. Calls are strictly serialized by+ the scheduler thread, so a single worker is sufficient.+ """+ if getattr(self, "_update_thread", None) is not None:+ return self._update_thread++ self._update_req = threading.Event()+ self._update_done = threading.Event()+ self._update_job = None+ self._update_stop = False++ def _worker():+ self._device_module.set_device(self._device_id)+ while True:+ self._update_req.wait()+ self._update_req.clear()+ if self._update_stop:+ self._update_done.set()+ return+ graph, cpu_update_input = self._update_job+ graph.update(cpu_update_input=cpu_update_input)+ self._update_done.set()++ thread = threading.Thread(target=_worker, daemon=True)+ thread.start()+ self._update_thread = thread+ return thread+ def cleanup(self) -> None:+ if getattr(self, "_update_thread", None) is not None:+ self._update_stop = True+ self._update_req.set()+ self._update_thread.join(timeout=2)+ self._update_thread = None self._graphs.clear() self._outputs.clear() self._pool = None@@ -242,6 +242,12 @@ class NPUGraphRunner(DecodeCudaGraphRunner): if forward_batch.forward_mode.is_target_verify(): seq_lens_cpu = forward_batch.seq_lens.cpu() + self.captured_req_width seq_lens = seq_lens_cpu.tolist() + [0] * (self.bs - self.raw_bs)+ elif forward_batch.seq_lens_cpu is not None:+ # Use the host-side seq lens already maintained by the+ # scheduler instead of a per-step D2H copy.+ seq_lens = forward_batch.seq_lens_cpu.tolist() + [0] * (+ self.bs - self.raw_bs+ ) else: seq_lens = forward_batch.seq_lens.cpu().tolist() + [0] * ( self.bs - self.raw_bs@@ -781,9 +781,18 @@ class Scheduler( writer.publish_counter += 1 if writer.publish_counter < writer.publish_interval: return+ # Wall-clock throttle: snapshot publishing (queue walks, msgpack+ # encode, flock'd shm write) is not free, and forced publishes happen+ # on every prefill/idle iteration. Readers (/v1/loads, DP balancing)+ # only need coarse freshness.+ now = time.monotonic()+ last = getattr(self, "_last_load_snapshot_ts", None)+ if last is not None and now - last < 0.3:+ return writer.publish_counter = 0 try: writer.write(self.load_inquirer.get_loads())+ self._last_load_snapshot_ts = now except Exception as e: logger.warning("load snapshot publish failed: %s", e)