Inspect · Source & workspace
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>ls -l -a <path> <n> > <path>Claude Opus 5 · Serving
Online SLO goodput 1dev · Implementation Optimization
01 / PROCESS MAP
Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.
Main agentClaude Opus 5 · 185 visible calls
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>.
Requested workspace inspection related to source & workspace.
1 call · #0001–#0001
echo <val>ls -l -a <val> <n> > <path>ls -l -a <path> <n> > <path>Requested file and log inspection and workspace inspection related to task requirements.
3 calls · #0002–#0004
Read <path>cd <path>ls -l -a <val> <val> <val> <val> <val> <path> <n> > <path>head -n <n>Requested file and log inspection related to runtime processes.
1 call · #0005–#0005
Read <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0006–#0006
cd <path><command> <args>cat <val>Requested file and log inspection related to task requirements.
1 call · #0007–#0007
cd <path>echo <val>cat <val>Requested file and log inspection related to benchmark & validation setup.
1 call · #0008–#0008
Read <path>Requested source searches, file and log inspection and environment setup or inspection related to source & workspace.
8 calls · #0009–#0016
cd <path>grep -n <val> <path>head -n <n>Read <path>envgrep -i -E <val>sortecho <flag>git log --oneline <flag>git status <flag>headlsRequested runtime inspection, file and log inspection and script or workload execution related to device memory.
1 call · #0017–#0017
which <val>npu-smi info <n> >& <path>head -n <n>echo <val>python3 -c <script> <n> >& <path>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0018–#0018
date -upython3 -c <script>Requested file and log inspection and workspace inspection related to source & workspace.
1 call · #0019–#0019
cat <path> <n> >& <path>head -n <n>echo <val>ls -l -a <path> <n> >& <path>headRequested script or workload execution and file and log inspection related to dependencies & build setup.
1 call · #0020–#0020
python3 -c <script> <n> >& <path>tail -n <n>echo <val>python3 -m <module> <val> <val> <n> >& <path>head -n <n>Requested file and log inspection related to source & workspace.
3 calls · #0021–#0023
cd <path>sed -n <val> <path>Read <path>Requested source searches, file and log inspection and workspace inspection related to attention kernels.
1 call · #0024–#0024
grep -r -n <val> <path>head -n <n>echo <val>ls <path>echogrep -r -l -n <val> <path> --include <path>wc -lRequested workspace inspection and file and log inspection related to source & workspace.
1 call · #0025–#0025
ls <path>echo <val>cat <path>Requested workspace file updates and file and log inspection related to batching & scheduling.
1 call · #0026–#0026
mkdir -p <path>cat > <path> <script>chmod <val> <path>echo <val>Requested script or workload execution, execution waits and file and log inspection related to runtime processes.
2 calls · #0027–#0028
cd <path>nohup <val> <path> <path> > <path> <n> >& <path>sleep <n>echo <val>tail -n <n> <path> <n> > <path>tail -n <n> <path>Requested script or workload execution related to task requirements.
1 call · #0029–#0029
cd <path>python3 - <script>Requested execution waits, file and log inspection and service requests related to runtime processes.
2 calls · #0030–#0031
sleep <n>tail -c <n> <path>echo <val>curl -s -m <n> <url> -o <path> -w <val>Requested source searches, file and log inspection and workspace inspection related to attention kernels.
1 call · #0032–#0032
grep -r -n <val> <path>head -n <n>echo <val>ls <path>grep -i -E <val>Requested file and log inspection and workspace file updates related to latency & request handling.
1 call · #0033–#0033
cat > <path> <script>chmod <val> <path>echo <val>Requested execution waits, file and log inspection and service requests related to runtime processes.
2 calls · #0034–#0035
sleep <n>tail -c <n> <path>echocurl -s -m <n> <url> -o <path> -w <val>Requested script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0036–#0036
cd <path>timeout <n> <val> <path> <val> <n> <n> >& <path>tail -n <n>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0037–#0037
find <path> -name <path>head -n <n>echo <val>xargs <val> -lsort <flag>Requested file and log inspection related to runtime processes.
1 call · #0038–#0038
tail -c <n> <path> <n> > <path>echo <val>tail -c <n> <path>Requested source searches and file and log inspection related to runtime processes.
1 call · #0039–#0039
grep -c <val> <path>grep <val> <path>tail -n <n>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0040–#0040
grep -n <val> <path>head -n <n>Requested source searches and file and log inspection related to attention kernels.
1 call · #0041–#0041
grep -o <val> <path>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0042–#0042
tail -c <n> <path> <n> > <path>Requested script or workload execution related to source & workspace.
1 call · #0043–#0043
cd <path>python3 <script> <val>python3 -c <script>Requested source searches, script or workload execution and file and log inspection related to runtime processes.
1 call · #0044–#0044
cd <path>grep -o <path> <val>python3 -c <script>echo <val>grep -o <val> <val>sort <flag> <args>uniq -ctail -n <n>Requested runtime inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0045–#0045
which <val>ps <val>grep -E <val>grep -v <val>awk <val>headRequested script or workload execution, execution waits and file and log inspection related to runtime processes.
1 call · #0046–#0046
cd <path>nohup <val> <path> <val> <n> > <path> <n> >& <path>echo <val>sleep <n>tail -c <n> <path>Requested execution waits, source searches and file and log inspection related to batching & scheduling.
1 call · #0047–#0047
sleep <n><command> <args>grep <val>grep -v <val>awk <val>head <flag>echo <val>timeout <n> <path> <val> -p <val> -d <n> -r <n> -f <val> <args>tail -n <n>timeout <n> <path> <val> -p <val> -d <n> <flag> <args>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0048–#0048
cd <path>python3 - <script>Requested source searches, file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0049–#0049
<command> <args>grep <val>grep -v <val>awk <val>head <flag>timeout <n> <path> <val> -p <val> <n> >& <path>head -n <n>sleep <n>Requested file and log inspection and source searches related to source & workspace.
8 calls · #0050–#0057
Read <path>sed -n <val> <path>echo <val>grep -r -n <val> <path> <path> <n> > <path>head -n <n>grep -n <val> <path> <n> > <path>grep -r -n <val> <path>headgrep -r -n <val> <path> <n> > <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0058–#0058
grep -n <val> <path>head -n <n>Requested file and log inspection and workspace inspection related to source & workspace.
2 calls · #0059–#0060
sed -n <val> <path>ls <path>echo <val>sed -n <val> <path> <n> > <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0061–#0061
grep -n <val> <path>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0062–#0062
sed -n <val> <path>Requested file and log inspection related to attention kernels.
2 calls · #0063–#0064
Read <path>Requested script or workload execution related to attention kernels.
1 call · #0065–#0065
python3 - <script>Requested file and log inspection related to source & workspace.
5 calls · #0066–#0070
Read <path>Requested process termination, execution waits and runtime inspection related to runtime processes.
1 call · #0071–#0071
pkill -f <val> <n> > <path>sleep <n>pkill <flag> <args>ps <val>grep -c <val>ls <path> <n> >& <path>tail -n <n>Requested runtime inspection, source searches and file and log inspection related to device memory.
3 calls · #0072–#0074
ps <val>grep <val>wc -lls -l -a <path> <n> >& <path>tail -n <n>npu-smi info <n> >& <path>grep -E <val>head -n <n>awk <val>pkill <flag> <args>sleep <n>echo <flag>sed -n <val>Requested environment setup or inspection, script or workload execution and execution waits related to task requirements.
1 call · #0075–#0075
cd <path>export <vars>nohup <val> <path> > <path> <n> >& <path>echo <val>sleep <n>tail -n <n> <path> <n> > <path>Requested execution waits and file and log inspection related to benchmark & validation setup.
1 call · #0076–#0076
sleep <n>tail -n <n> <path> <n> > <path>echo <flag>tail -c <n> <path> <n> > <path>Requested file and log inspection related to attention kernels.
1 call · #0077–#0077
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0078–#0078
tail -n <n> <path> <n> > <path>echo <flag>tail -c <n> <path> <n> > <path>Requested file and log inspection related to attention kernels.
1 call · #0079–#0079
sed -n <val> <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0080–#0080
tail -n <n> <path> <n> > <path>echo <flag>ls -l -a <path> <n> > <path>tail -n <n>Requested file and log inspection related to batching & scheduling.
1 call · #0081–#0081
sed -n <val> <path>Requested execution waits, file and log inspection and workspace inspection related to benchmark & validation setup.
2 calls · #0082–#0083
sleep <n>tail -n <n> <path> <n> > <path>echo <flag>ls <path> <n> > <path>mkdir -p <path>cp <path> <path>python3 -c <script>Requested file and log inspection related to source & workspace.
2 calls · #0084–#0085
cat <path> <n> > <path>head -n <n>Read <path>Requested file and log inspection, source searches and runtime inspection related to attention kernels.
6 calls · #0086–#0091
sed -n <val> <path>grep -n <val> <path>ps <val>grep -c <val>echo <flag>ls <path> <n> > <path>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0092–#0092
date -uecho <val>echo <flag>ls <path> <n> >& <path>headRequested runtime inspection, source searches and file and log inspection related to device memory.
1 call · #0093–#0093
ps <val>grep <val>wc -lnpu-smi info <n> >& <path>tail -n <n>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0094–#0094
ls <path> <n> >& <path>echo <flag>find <path> -maxdepth <n> -name <val> -type <val> <n> > <path>headRequested code edits related to source & workspace.
1 call · #0095–#0095
Write <path>Requested environment setup or inspection and file and log inspection related to attention kernels.
1 call · #0096–#0096
cd <path><command> <args>env <vars> timeout <n> <path> <path> <n> >& <path>tail -n <n>Requested code edits related to source & workspace.
1 call · #0097–#0097
Write <path>Requested environment setup or inspection, file and log inspection and execution waits related to source & workspace.
6 calls · #0098–#0103
cd <path>env <vars> timeout <n> <path> <path> <val> <n> >& <path>tail -n <n>sleep <n>cat <path> <n> >& <path>env <vars>ls -l -a <val> <n> >& <path>echo <val>tail -c <n> <val> <n> >& <path>ps <val>grep <val>head -n <n>echo <flag>wc -c <val>date -ugrep -n <val> <path>Requested runtime inspection, source searches and environment setup or inspection related to source & workspace.
2 calls · #0104–#0105
ps <val>grep -c <val>date -uenv <vars>wc -c <val>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0106–#0107
Read <path>grep -n <val> <path>head -n <n>Requested environment setup or inspection, file and log inspection and runtime inspection related to source & workspace.
1 call · #0108–#0108
env <vars>wc -c <val>ps <val>grep <val>wc -ldate -uRequested environment setup or inspection, file and log inspection and source searches related to source & workspace.
5 calls · #0109–#0113
env <vars>cat <val>echo <flag>date -used -n <val> <path>grep -r -n <val> <path>headecho <val>grep -r -n <val> <path> <path> <n> > <path>grep -v <val>Requested process termination, execution waits and runtime inspection related to device memory.
2 calls · #0114–#0115
pkill <flag> <args>sleep <n>ps <val>grep -c <val>echo <flag>npu-smi info <n> >& <path>tail -n <n>grep <val>wc -lRequested source searches and file and log inspection related to attention kernels.
1 call · #0116–#0116
grep -n <val> <flag> <args>head -n <n>Requested code edits related to source & workspace.
5 calls · #0117–#0121
Edit <path>Requested script or workload execution related to source & workspace.
1 call · #0122–#0122
python3 -m <module> <script> <script>echo <val>Requested source searches and file and log inspection related to source & workspace.
1 call · #0123–#0123
grep -n <val> <path>head -n <n>Requested file and log inspection related to runtime processes.
1 call · #0124–#0124
cd <path><command> <args>cat <val>Requested script or workload execution, execution waits and file and log inspection related to runtime processes.
2 calls · #0125–#0126
cd <path>nohup <val> <path> <path> > <path> <n> >& <path>sleep <n>echo <val>date -u<command> <args>echo <flag>tail -n <n> <path>Requested script or workload execution and file and log inspection related to benchmark & validation setup.
1 call · #0127–#0127
cd <path>bash <script> <val> <n> <n> >& <path>tail -n <n>date -uRequested execution waits, source searches and file and log inspection related to runtime processes.
1 call · #0128–#0128
sleep <n>grep <val> <path>tail -n <n>Requested environment setup or inspection, file and log inspection and execution waits related to source & workspace.
2 calls · #0129–#0130
env <vars>wc -c <val>tail -n <n> <val> <n> >& <path>echo <val>date -usleep <n>Requested environment setup or inspection, workspace inspection and file and log inspection related to runtime processes.
1 call · #0131–#0131
env <vars>echo <val>ls -l -a <path> <n> >& <path>tail -n <n> <val> <n> >& <path>date -uRequested script or workload execution and file and log inspection related to source & workspace.
1 call · #0132–#0132
cd <path>python3 <script> <val> <n> >& <path>tail -n <n>Requested process termination, execution waits and runtime inspection related to device memory.
1 call · #0133–#0133
pkill <flag> <args>sleep <n>echo <val>npu-smi info <n> >& <path>tail -n <n>Requested process termination, execution waits and runtime inspection related to device memory.
1 call · #0134–#0134
pkill <flag> <args>sleep <n>echo <val>npu-smi info <n> >& <path>tail -n <n>echo <path>Requested runtime inspection, source searches and file and log inspection related to device memory.
1 call · #0135–#0135
ps <val>grep <val>wc -lnpu-smi info <n> >& <path>tail -n <n><command> <args>grep <n>echo <val>Requested environment setup or inspection and execution waits related to task requirements.
1 call · #0136–#0136
env <vars>env <vars> nohup <val> <path> > <path> <n> >& <path>sleep <n>echo <val>date -uRequested execution waits and file and log inspection related to benchmark & validation setup.
1 call · #0137–#0137
<command> <args>sleep <n>tail -n <n> <path>date -uRequested code edits related to source & workspace.
1 call · #0138–#0138
Edit <path>Requested script or workload execution and repository inspection related to source & workspace.
2 calls · #0139–#0140
python3 -m <module> <script> <script>echo <val>git status <flag>git diff --statgit diffRequested repository inspection and file and log inspection related to batching & scheduling.
1 call · #0141–#0141
git add <path> <path>git commit -q -F <val> <script>git log --oneline <flag>git status <flag>wc -lRequested environment setup or inspection and workspace inspection related to source & workspace.
1 call · #0142–#0142
env <vars>ls -l -a <path>echo <path>Requested runtime inspection, source searches and file and log inspection related to device memory.
1 call · #0143–#0143
ps <val>grep -c <val>npu-smi info <n> >& <path>tail -n <n>Requested environment setup or inspection and file and log inspection related to benchmark & validation setup.
1 call · #0144–#0144
env <vars><command> <args>cat <path>Requested environment setup or inspection, script or workload execution and execution waits related to benchmark & validation setup.
2 calls · #0145–#0146
env <vars>nohup <val> <path> > <path> <n> >& <path>sleep <n>echo <val>date -uwc -c <path>tail -c <n> <path>echoRequested file and log inspection, runtime inspection and source searches related to benchmark & validation setup.
1 call · #0147–#0147
wc -c <path>echo <flag>ps <val>grep -c <val>grep <val>wc -lRequested execution waits, environment setup or inspection and workspace inspection related to benchmark & validation setup.
3 calls · #0148–#0150
sleep <n>echo <path>echo <val>env <vars>ls -l -a <val> <n> > <path>tail -n <n>grep <val> <path> <n> > <path>ls -l -a <val>grep -c <val> <path> <n> > <path>Requested environment setup or inspection and file and log inspection related to source & workspace.
1 call · #0151–#0151
env <vars>cat <path> <n> > <path>echoecho <val>Requested execution waits, environment setup or inspection and file and log inspection related to benchmark & validation setup.
1 call · #0152–#0152
sleep <n>env <vars>echo <val>cat <path> <n> > <path>tr <val> <val>grep -E <val>echoecho <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0153–#0153
tail -c <n> <path>echoecho <val>Requested repository inspection, workspace inspection and file and log inspection related to device memory.
1 call · #0154–#0154
echo <val>git status <flag>find <path> -name <val> -o -name <val> <n> > <path>headecho <path>ps <val>grep -c <val><command> <args>grep <flag> <args>npu-smi info <n> >& <path>tail -n <n>Requested runtime inspection, source searches and file and log inspection related to runtime processes.
1 call · #0155–#0155
ps <val>grep <val>head -n <n>echo <val>git <val> <val>Requested environment setup or inspection, script or workload execution and file and log inspection related to source & workspace.
1 call · #0156–#0156
env <vars>bash <script> <n> >& <path>tail -n <n>echo <val>Requested environment setup or inspection, script or workload execution and execution waits related to benchmark & validation setup.
2 calls · #0157–#0158
env <vars>nohup <val> <path> > <path> <n> >& <path>sleep <n>echo <val>date -u<command> <args>tail -c <n> <path>echoRequested environment setup or inspection and file and log inspection related to source & workspace.
1 call · #0159–#0159
env <vars>cat <path>echo <val>Requested environment setup or inspection and file and log inspection related to benchmark & validation setup.
1 call · #0160–#0160
env <vars>env <vars> timeout <n> <val> <path> <n> >& <path>tail -c <n>echoecho <val>Requested runtime inspection, source searches and file and log inspection related to device memory.
1 call · #0161–#0161
echo <val>ps <val>grep <val>wc -lecho <path><command> <args>grep -E <val>npu-smi info <n> >& <path>tail -n <n>git <val> <val>ls -l -a <path>Requested workspace file updates and workspace inspection related to benchmark & validation setup.
1 call · #0162–#0162
mkdir -p <path>cp <path> <path> <path> <path> <n> >& <path>ls <path>echo <val>Requested script or workload execution related to source & workspace.
1 call · #0163–#0163
python3 - <script>Requested script or workload execution related to source & workspace.
1 call · #0164–#0164
python3 - <script>Requested script or workload execution related to batching & scheduling.
1 call · #0165–#0165
python3 - <script>Requested script or workload execution related to latency & request handling.
1 call · #0166–#0166
python3 - <script>Requested runtime inspection, source searches and environment setup or inspection related to task requirements.
1 call · #0167–#0167
ps <val>grep -c <val>env <vars>env <vars> nohup <val> <path> > <path> <n> >& <path>sleep <n>echo <val>date -uRequested execution waits and file and log inspection related to benchmark & validation setup.
1 call · #0168–#0168
<command> <args>sleep <n>tail -c <n> <path>echodate -uRequested repository inspection, runtime inspection and source searches related to device memory.
2 calls · #0169–#0170
echo <val>git status <flag>git log --oneline <flag>ps <val>grep <val>wc -l<command> <args>grep -E <val>git <val> <val>npu-smi info <n> >& <path>tail -n <n>env <vars>ls -l -a <path> <n> >& <path>cat <path> <n> > <path>Requested code edits related to device memory.
4 calls · #0171–#0174
Write <path>Requested environment setup or inspection, script or workload execution and workspace inspection related to benchmark & validation setup.
2 calls · #0175–#0176
env <vars>echo <val>python3 -c <script>find <val> <val> -name <val> <flag> <args>head -n <n>Requested workspace inspection, file and log inspection and repository inspection related to source & workspace.
3 calls · #0177–#0179
cd <path>echo <val>find <path> -name <val> -o -name <val> <n> > <path>headfind <val> <val> -name <val> <flag> <args>git status <flag> <args>ls <path>head -n <n>echo <flag>du <flag> <args>rm -rf <path>echo <path>Requested repository inspection, file and log inspection and runtime inspection related to device memory.
1 call · #0180–#0180
cd <path>echo <val>git status <flag>git log --oneline <flag>git show --stat --oneline <val>tail -n <n>echo <path>ps <val>grep <val>wc -l<command> <args>grep <flag> <args>git <val> <val>npu-smi info <n> >& <path>Requested runtime inspection and source searches related to runtime processes.
1 call · #0181–#0181
cd <path>ps <val>grep <val>cut <flag>echo <flag>Requested runtime inspection, source searches and file and log inspection related to runtime processes.
1 call · #0182–#0182
cd <path>echo <path>pgrep <flag> <args>grep -v <val>headecho <val><command> <args>grep -E <val>Requested environment setup or inspection, repository inspection and script or workload execution related to device memory.
1 call · #0183–#0183
cd <path>env <vars>echo <val>git status <flag>echo <val> <val> <flag> <args>python3 -c <script>echo <path>npu-smi info <n> >& <path>grep -E <val>head -n <n>Requested environment setup or inspection and script or workload execution related to benchmark & validation setup.
1 call · #0184–#0184
env <vars>echo <val>python3 -c <script>Requested source searches, file and log inspection and runtime inspection related to runtime processes.
1 call · #0185–#0185
cd <path><command> <args>grep -E <path>grep -v <val>wc <flag>echo <path>ps <flag> <args>cut <flag>echo <val>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
@@ -63,6 +63,12 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): self._enable_torch_compile = getattr( cuda_graph_runner, "enable_torch_compile", False )+ # Long-lived updater thread, started on the first replay that needs it.+ self._update_thread: Optional[threading.Thread] = None+ self._update_request: Optional[tuple] = None+ self._update_error: Optional[BaseException] = None+ self._update_ready = threading.Event()+ self._update_done = threading.Event() @contextmanager def capture_session(self, stream):@@ -165,18 +171,65 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): cpu_update_input = [{attr_name: seq_lens}] 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._submit_update(graph, cpu_update_input) graph.replay()- thread.join()+ self._await_update() return self._outputs[shape_key] + def _submit_update(self, graph, cpu_update_input: list) -> None:+ """Hand the graph rebind to the long-lived updater thread.++ The rebind must overlap graph.replay(): the update stream records an+ event per dispatch record and the replayed graph waits on it, so the+ two have to be in flight together. Spawning a fresh thread per decode+ step just to get that overlap costs interpreter and pthread setup on+ every step, so a single worker is kept alive instead.+ """+ if self._update_thread is None:+ self._update_thread = threading.Thread(+ target=self._update_worker, daemon=True+ )+ self._update_thread.start()+ self._update_error = None+ # Clear the completion flag before handing off, so a replay that raised+ # and skipped _await_update cannot leave it set for the next step.+ self._update_done.clear()+ self._update_request = (graph, cpu_update_input)+ self._update_ready.set()++ def _await_update(self) -> None:+ self._update_done.wait()+ self._update_done.clear()+ error, self._update_error = self._update_error, None+ if error is not None:+ raise error++ def _update_worker(self) -> None:+ # The device is thread-local on NPU, so bind it once for this thread+ # rather than on every step.+ self._device_module.set_device(self._device_id)+ while True:+ self._update_ready.wait()+ self._update_ready.clear()+ request = self._update_request+ if request is None:+ return+ graph, cpu_update_input = request+ try:+ graph.update(cpu_update_input=cpu_update_input)+ except BaseException as exc: # surfaced by _await_update+ self._update_error = exc+ finally:+ self._update_request = None+ self._update_done.set()+ def cleanup(self) -> None:+ thread, self._update_thread = self._update_thread, None+ if thread is not None:+ # A None request tells the worker to return.+ self._update_request = None+ self._update_ready.set()+ thread.join(timeout=5) self._graphs.clear() self._outputs.clear() self._pool = None@@ -243,9 +243,22 @@ class NPUGraphRunner(DecodeCudaGraphRunner): seq_lens_cpu = forward_batch.seq_lens.cpu() + self.captured_req_width seq_lens = 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- )+ # forward_batch.seq_lens_cpu is the host-side mirror the scheduler+ # already maintains, so prefer it: reading .seq_lens (device) here+ # forces a D2H copy that also drains every kernel queued ahead of+ # it, stalling the host on each decode step. Fall back to the+ # device tensor when no mirror is available.+ seq_lens_cpu = forward_batch.seq_lens_cpu+ if seq_lens_cpu is None:+ seq_lens_cpu = forward_batch.seq_lens.cpu()+ seq_lens = seq_lens_cpu.tolist()+ # The mirror may or may not already be padded to the captured+ # batch size; the graph pad value is 0, so trimming/extending+ # with 0 here yields the same list either way.+ if len(seq_lens) < self.bs:+ seq_lens += [0] * (self.bs - len(seq_lens))+ elif len(seq_lens) > self.bs:+ seq_lens = seq_lens[: self.bs] output = self.backend.replay_with_input_update( graph_key, seq_lens=seq_lens,