Inspect · Source & workspace
Requested workspace inspection and environment setup or inspection related to source & workspace.
1 call · #0001–#0001
pwdprintenv <vars>GPT-6 Astra · Serving
Online saturation throughput 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 agentGPT-6 Astra · 261 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 and environment setup or inspection related to source & workspace.
1 call · #0001–#0001
pwdprintenv <vars>Requested source searches and file and log inspection related to task requirements.
3 calls · #0002–#0004
rg --files -g <val> -g <path> -g <path> -g <path> -g <path> <args>cat <path> <path><command> <args>Requested repository inspection related to source & workspace.
1 call · #0005–#0005
git status --shortRequested file and log inspection and source searches related to task requirements.
2 calls · #0006–#0007
cat <path> <path> <path> <path>rg --files <path> <path> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0008–#0008
cat <path> <path> <path> <path> <path>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0009–#0010
cat <path>rg --files <path>rg <val>Requested script or workload execution related to task requirements.
1 call · #0011–#0011
python - <script>Requested script or workload execution related to source & workspace.
1 call · #0012–#0012
bash <script>Requested source searches related to benchmark & validation setup.
1 call · #0013–#0013
rg -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0014–#0014
sed -n <val> <path>Requested environment setup or inspection related to source & workspace.
1 call · #0015–#0015
env <vars> bash <script>Requested file and log inspection, source searches and environment setup or inspection related to source & workspace.
4 calls · #0016–#0019
sed -n <val> <path>rg -n <val> <path>head -n <n>printenv <vars>Requested file and log inspection related to attention kernels.
1 call · #0020–#0020
sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0021–#0021
sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0022–#0022
cat <path>sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0023–#0023
tail -n <n> <path>Requested workspace inspection and file and log inspection related to source & workspace.
1 call · #0024–#0024
ls -l -a <val>sed -n <val> <path>Requested source searches related to attention kernels.
1 call · #0025–#0025
rg -n <val> <path> <path> <path>Requested runtime inspection related to device memory.
1 call · #0026–#0026
npu-smi infoRequested file and log inspection related to attention kernels.
1 call · #0027–#0027
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0028–#0028
tail -n <n> <path>Requested source searches and file and log inspection related to speculative decoding.
1 call · #0029–#0029
rg -n <val> <path> <path> <path> <path>head -n <n>Requested file and log inspection related to attention kernels.
1 call · #0030–#0030
sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0031–#0032
rg --files <val>rg <val>head -n <n>sed -n <val> <path>rg -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0033–#0033
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0034–#0034
sed -n <val> <path>Requested file and log inspection and source searches related to runtime processes.
1 call · #0035–#0035
cat <path>rg -n <val> <path> <path> <path> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0036–#0036
rg -n <val> <path> <path> <path>head -n <n>cat <path>Requested file and log inspection related to benchmark & validation setup.
2 calls · #0037–#0038
tail -n <n> <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0039–#0039
rg -n <val> <path>head -n <n>rg --files <path>rg <val>sed -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0040–#0040
sed -n <val> <path>cat <path>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0041–#0041
sed -n <val> <path>rg -n <val> <path>Requested file and log inspection and source searches related to source & workspace.
1 call · #0042–#0042
sed -n <val> <path>rg -n <val> <path> -g <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0043–#0043
tail -n <n> <path>cut -c <val>Requested runtime inspection and source searches related to runtime processes.
1 call · #0044–#0044
ps <flag> <args>rg <val>cut -c <val>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0045–#0045
rg -n <val> <path> <path> <path> <path>head -n <n>Requested source searches and file and log inspection related to attention kernels.
1 call · #0046–#0046
rg --files <val>rg <val>rg -n <val> <path>sed -n <val> <path>Requested source searches and file and log inspection related to device memory.
1 call · #0047–#0047
rg -n <val> <path>sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0048–#0048
sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0049–#0049
tail -n <n> <path>cut -c <val>Requested file and log inspection and source searches related to attention kernels.
1 call · #0050–#0050
cat <path>rg -n <val> <path> <path>rg -n <val> <path>Requested source searches and file and log inspection related to dependencies & build setup.
1 call · #0051–#0051
rg -n <val> <path> <path>rg -n <val> <path>tail -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0052–#0052
python - <script>Requested environment setup or inspection related to task requirements.
1 call · #0053–#0053
env <vars> python - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0054–#0054
python - <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0055–#0055
rg --files <path>head -n <n>rg -n <val> <path> -g <path>rg -n <val> <path> <path>Requested file and log inspection and source searches related to attention kernels.
1 call · #0056–#0056
sed -n <val> <path>rg -n <val> <path>tail -n <n>Requested file and log inspection and source searches related to source & workspace.
1 call · #0057–#0057
cat <path>rg --files <path>rg <val>Requested source searches and file and log inspection related to runtime processes.
1 call · #0058–#0058
rg -n <val> <path>sed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0059–#0060
rg -n <val> <path>head -n <n>rg --files <path>rg <val>Requested script or workload execution related to source & workspace.
1 call · #0061–#0061
python - <script>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0062–#0063
sed -n <val> <path>rg -n <val> <path>tail -n <n>Requested script or workload execution related to source & workspace.
1 call · #0064–#0064
python - <script>Requested code edits related to source & workspace.
1 call · #0065–#0065
Apply patch <patch>Requested file and log inspection related to source & workspace.
1 call · #0066–#0066
sed -n <val> <path>Requested repository inspection, source searches and file and log inspection related to batching & scheduling.
1 call · #0067–#0067
git diff --statrg --files <path>rg <val>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0068–#0068
python - <script>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0069–#0070
rg --files <path>rg <val>head -n <n>cat <path>sed -n <val> <path>Requested script or workload execution related to source & workspace.
1 call · #0071–#0071
python - <script>Requested file and log inspection related to task requirements.
1 call · #0072–#0072
cat > <path> <script>Requested script or workload execution related to source & workspace.
1 call · #0073–#0073
python - <script>Requested file and log inspection and source searches related to attention kernels.
1 call · #0074–#0074
cat <path>rg -n <val> <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0075–#0075
rg -n <val> <path>rg -n <val> <path> -g <path>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0076–#0076
python - <script>Requested file and log inspection and source searches related to benchmark & validation setup.
1 call · #0077–#0077
command -v <val> <val> <val>sed -n <val> <path>rg -n <val> <path>Requested repository inspection related to source & workspace.
1 call · #0078–#0078
git status --shortRequested script or workload execution related to source & workspace.
1 call · #0079–#0079
python - <script>Requested environment setup or inspection related to task requirements.
1 call · #0080–#0080
env <vars> bash <script> > <path> <n> >& <path>Requested source searches related to batching & scheduling.
1 call · #0081–#0081
rg -n <val> <path> <path> -g <path>rg -n <val> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0082–#0082
python - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0083–#0083
python - <script>Requested code edits related to source & workspace.
1 call · #0084–#0084
Apply patch <patch>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0085–#0085
rg -n <val> <path>cat <path>head -n <n>Requested file and log inspection and repository inspection related to source & workspace.
1 call · #0086–#0086
tail -n <n> <path>git diff --checkRequested file and log inspection related to batching & scheduling.
1 call · #0087–#0087
sed -n <val> <path>Requested environment setup or inspection related to source & workspace.
1 call · #0088–#0088
env <vars> python -m <module> <val> > <path> <n> >& <path>Requested source searches, file and log inspection and script or workload execution related to source & workspace.
2 calls · #0089–#0090
rg -n <val> <path>tail -n <n>sed -n <val> <path>tail -n <n> <path>python - <script>Requested source searches and file and log inspection related to attention kernels.
1 call · #0091–#0091
rg -n <val> <path> <path> -g <path>sed -n <val> <path>Requested repository inspection, source searches and file and log inspection related to source & workspace.
4 calls · #0092–#0095
git diff <flag> <args>rg -n <val> <path>head -n <n>sed -n <val> <path>python - <script>rg -n <val> <path> <path>Requested source searches and file and log inspection related to kv-cache management.
1 call · #0096–#0096
rg -n <val> <path>tail -n <n>sed -n <val> <path>Requested file and log inspection, repository inspection and runtime inspection related to batching & scheduling.
2 calls · #0097–#0098
tail -n <n> <path>git diff --numstatps <flag> <args>rg <path>cut -c <val>Requested source searches and file and log inspection related to source & workspace.
1 call · #0099–#0099
rg -n <val> <path>head -n <n>Requested script or workload execution related to batching & scheduling.
1 call · #0100–#0100
python - <script>Requested environment setup or inspection related to batching & scheduling.
1 call · #0101–#0101
env <vars> pytest -q <path> <path> <path> > <path> <n> >& <path>Requested file and log inspection related to attention kernels.
1 call · #0102–#0102
sed -n <val> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0103–#0103
tail -n <n> <path>python - <script>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0104–#0105
rg --files <path>rg <val>head -n <n>rg -n <val> <path> -g <path>Requested script or workload execution related to source & workspace.
1 call · #0106–#0106
python - <script>Requested source searches and file and log inspection related to attention kernels.
1 call · #0107–#0107
rg -n <val> <path>head -n <n>Requested file and log inspection and script or workload execution related to batching & scheduling.
1 call · #0108–#0108
tail -n <n> <path>python - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0109–#0109
python <script> <val> <val> > <path> <n> >& <path>Requested file and log inspection related to source & workspace.
1 call · #0110–#0110
cat > <path> <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0111–#0111
python - <script>Requested script or workload execution, repository inspection and environment setup or inspection related to benchmark & validation setup.
1 call · #0112–#0112
python - <script>git diff > <path>env <vars> python <script> > <path> <n> >& <path>Requested code edits related to batching & scheduling.
1 call · #0113–#0113
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0114–#0114
tail -n <n> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0115–#0115
python - <script>Requested code edits related to source & workspace.
1 call · #0116–#0116
Apply patch <patch>Requested repository inspection related to source & workspace.
1 call · #0117–#0117
git diff --checkRequested file and log inspection related to batching & scheduling.
1 call · #0118–#0118
sed -n <val> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0119–#0119
python - <script>Requested environment setup or inspection related to source & workspace.
1 call · #0120–#0120
env <vars> python -m <module> <val> > <path> <n> >& <path>Requested file and log inspection and source searches related to attention kernels.
1 call · #0121–#0121
sed -n <val> <path>rg -n <val> <path>Requested file and log inspection and source searches related to batching & scheduling.
1 call · #0122–#0122
tail -n <n> <path>rg -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0123–#0123
sed -n <val> <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0124–#0124
python - <script>Requested script or workload execution and file and log inspection related to source & workspace.
1 call · #0125–#0125
python - <script>sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0126–#0126
cat > <path> <script>Requested script or workload execution related to benchmark & validation setup.
2 calls · #0127–#0128
python - <script>python <script> <val> <val> > <path> <n> >& <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0129–#0129
python - <script>Requested code edits related to batching & scheduling.
1 call · #0130–#0130
Apply patch <patch>Requested script or workload execution and environment setup or inspection related to benchmark & validation setup.
1 call · #0131–#0131
python - <script>env <vars> python <script> > <path> <n> >& <path>Requested script or workload execution and file and log inspection related to rollout generation.
1 call · #0132–#0132
python - <script>tail -n <n> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0133–#0133
rg -n <val> <path>head -n <n>Requested file and log inspection and source searches related to attention kernels.
1 call · #0134–#0134
head -n <n> <path>rg -n <val> <path>head -n <n>Requested repository inspection and script or workload execution related to source & workspace.
1 call · #0135–#0135
git diff --statgit diff --checkpython - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0136–#0136
python - <script>Requested file and log inspection and source searches related to source & workspace.
1 call · #0137–#0137
sed -n <val> <path>rg -n <val> <path>head -n <n>Requested file and log inspection and source searches related to attention kernels.
1 call · #0138–#0138
sed -n <val> <path>rg --files <path>rg <val>head -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0139–#0139
python - <script>Requested file and log inspection and source searches related to attention kernels.
1 call · #0140–#0140
sed -n <val> <path>rg -n <val> <path>tail -n <n>Requested source searches, file and log inspection and repository inspection related to source & workspace.
2 calls · #0141–#0142
rg -n <val> <path> <path> -g <val>head -n <n>git status --shortRequested script or workload execution related to benchmark & validation setup.
1 call · #0143–#0143
python - <script>Requested environment setup or inspection related to task requirements.
1 call · #0144–#0144
env <vars> bash <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0145–#0145
tail -c <n> <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
1 call · #0146–#0146
ls -l <val>head -c <n> <val>sed -n <val> <path>rg -n <val> <path> -g <val>head -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0147–#0147
python - <script>Requested script or workload execution related to source & workspace.
1 call · #0148–#0148
python <script> <val> <val> > <path> <n> >& <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0149–#0149
rg --files <path>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0150–#0150
python - <script>Requested script or workload execution related to source & workspace.
2 calls · #0151–#0152
python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0153–#0153
tail -n <n> <path>Requested environment setup or inspection related to benchmark & validation setup.
1 call · #0154–#0154
cd <val>env <vars> python <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0155–#0155
tail -n <n> <path>cat <path>Requested file and log inspection related to source & workspace.
1 call · #0156–#0156
cat <path>head -n <n>Requested script or workload execution related to source & workspace.
1 call · #0157–#0157
python - <script>Requested file and log inspection, environment setup or inspection and source searches related to attention kernels.
3 calls · #0158–#0160
cat > <path> <script>cd <val>env <vars> python <script> > <path> <n> >& <path>rg -n <val> <path>tail -n <n>sed -n <val> <path>tail -n <n> <path>git diff --checkRequested script or workload execution related to benchmark & validation setup.
1 call · #0161–#0161
python - <script>Requested script or workload execution related to attention kernels.
1 call · #0162–#0162
python - <script>Requested file and log inspection and environment setup or inspection related to benchmark & validation setup.
1 call · #0163–#0163
cat > <path> <script>cd <val>env <vars> python <script> > <path> <n> >& <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0164–#0164
rg -n <val> <path>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0165–#0165
tail -n <n> <path>cat <path>sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0166–#0166
cat <path>Requested file and log inspection and repository inspection related to source & workspace.
5 calls · #0167–#0171
sed -n <val> <path>git status --shortcat <path>Requested file and log inspection related to task requirements.
1 call · #0172–#0172
cat <path> <path>Requested file and log inspection related to attention kernels.
1 call · #0173–#0173
tail -n <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0174–#0174
cat <path>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0175–#0175
cat > <path> <script>cd <val>python <script> > <path> <n> >& <path>Requested script or workload execution related to attention kernels.
1 call · #0176–#0176
python - <script>cd <val>python <script> > <path> <n> >& <path>Requested file and log inspection related to source & workspace.
1 call · #0177–#0177
sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0178–#0178
cat <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0179–#0179
cat <path>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0180–#0180
cat > <path> <script>cd <val>timeout <n> <val> <path> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0181–#0181
cat <path>Requested file and log inspection and source searches related to attention kernels.
3 calls · #0182–#0184
sed -n <val> <path>cat <path>rg -n <val> <path> <path>head -n <n>Requested source searches and file and log inspection related to source & workspace.
1 call · #0185–#0185
rg --files <path>head -n <n>Requested source searches related to rollout generation.
1 call · #0186–#0186
rg -n <val> <path>Requested source searches and file and log inspection related to benchmark & validation setup.
1 call · #0187–#0187
rg -n <val> <path>tail -n <n>Requested file and log inspection related to source & workspace.
1 call · #0188–#0188
sed -n <val> <path>Requested script or workload execution related to source & workspace.
2 calls · #0189–#0190
python - <script>Requested file and log inspection and script or workload execution related to attention kernels.
1 call · #0191–#0191
cat > <path> <script>cd <val>timeout <n> <val> <path> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0192–#0192
cat <path>Requested workspace file updates related to source & workspace.
1 call · #0193–#0193
cp <path> <path>Requested code edits related to attention kernels.
1 call · #0194–#0194
Apply patch <patch>Requested repository inspection and script or workload execution related to attention kernels.
1 call · #0195–#0195
git diff --checkpython -m <module> <script> <script> <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0196–#0196
tail -n <n> <path>Requested repository inspection and source searches related to attention kernels.
1 call · #0197–#0197
git diff --statrg -n <val> <path> <path> <path>Requested code edits related to source & workspace.
1 call · #0198–#0198
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0199–#0199
tail -n <n> <path>Requested environment setup or inspection related to source & workspace.
1 call · #0200–#0200
env <vars> python -m <module> <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0201–#0201
tail -n <n> <path>Requested source searches and file and log inspection related to source & workspace.
2 calls · #0202–#0203
du <flag> <args>rg --files <val> <path>rg <val>head -n <n>Requested file and log inspection related to benchmark & validation setup.
1 call · #0204–#0204
tail -n <n> <path>Requested script or workload execution, source searches and file and log inspection related to source & workspace.
2 calls · #0205–#0206
python - <script>rg -n <val> <path> --max-count <n>cut -c <val>tail -n <n> <path>Requested code edits related to source & workspace.
1 call · #0207–#0207
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0208–#0208
tail -n <n> <path>Requested script or workload execution related to source & workspace.
1 call · #0209–#0209
python - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0210–#0210
python <script> <val> <val> > <path> <n> >& <path>Requested source searches and file and log inspection related to batching & scheduling.
1 call · #0211–#0211
rg -n -A <n> -B <n> <val> <path>sed -n <val> <path>rg -n <val> <path> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0212–#0212
tail -n <n> <path>Requested script or workload execution and repository inspection related to benchmark & validation setup.
1 call · #0213–#0213
python - <script>git diff > <path>Requested script or workload execution related to attention kernels.
1 call · #0214–#0214
python - <script>Requested code edits related to batching & scheduling.
1 call · #0215–#0215
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0216–#0216
tail -n <n> <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0217–#0217
rg -n <val> <path>head -n <n>Requested code edits related to source & workspace.
1 call · #0218–#0218
Apply patch <patch>Requested environment setup or inspection related to source & workspace.
1 call · #0219–#0219
env <vars> python -m <module> <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0220–#0220
tail -n <n> <path>Requested script or workload execution and file and log inspection related to source & workspace.
1 call · #0221–#0221
python - <script>tail -n <n> <path>Requested file and log inspection, runtime inspection and source searches related to batching & scheduling.
2 calls · #0222–#0223
tail -n <n> <path>ps <flag> <args>rg <val>cut -c <val>python - <script>git diff --statRequested script or workload execution related to source & workspace.
1 call · #0224–#0224
bash <script> > <path> <n> >& <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0225–#0225
python <script> <val> <val> > <path> <n> >& <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0226–#0226
rg -n -A <n> -B <n> <val> <path>sed -n <val> <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0227–#0227
tail -n <n> <path>Requested repository inspection, source searches and file and log inspection related to source & workspace.
1 call · #0228–#0228
git <val> <val> <flag>rg -n <val> <path>tail -n <n>Requested script or workload execution related to benchmark & validation setup.
1 call · #0229–#0229
python - <script>Requested code edits related to attention kernels.
1 call · #0230–#0230
Apply patch <patch>Requested code edits related to source & workspace.
1 call · #0231–#0231
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0232–#0232
tail -n <n> <path>Requested repository inspection related to source & workspace.
1 call · #0233–#0233
git diff --checkgit status --shortRequested environment setup or inspection related to source & workspace.
1 call · #0234–#0234
env <vars> python -m <module> <script> > <path> <n> >& <path>Requested environment setup or inspection related to benchmark & validation setup.
1 call · #0235–#0235
env <vars> pytest -q <path> <path> <path> > <path> <n> >& <path>Requested source searches, file and log inspection and workspace inspection related to benchmark & validation setup.
3 calls · #0236–#0238
rg -n <val> <path> <path>head -n <n>ls <flag> <args>ls -l -a <path>ps <flag> <args>rg <val>cut -c <val>tail -n <n> <path>Requested script or workload execution and workspace inspection related to source & workspace.
1 call · #0239–#0239
python - <script>ls -l -a <path>Requested script or workload execution related to benchmark & validation setup.
1 call · #0240–#0240
python <script> <val> <val> > <path> <n> >& <path>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0241–#0241
cat <path>tail -n <n> <path>ls -l -h <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0242–#0242
du <flag> <args>rg --files --hidden <path>head -n <n>Requested script or workload execution related to attention kernels.
1 call · #0243–#0243
python - <script>Requested file and log inspection related to benchmark & validation setup.
1 call · #0244–#0244
tail -n <n> <path>Requested file and log inspection and script or workload execution related to source & workspace.
1 call · #0245–#0245
sed -n <val> <path>python - <script>Requested source searches and file and log inspection related to device memory.
1 call · #0246–#0246
rg -n -A <n> -B <n> <val> <path>head -n <n>rg -n -A <n> <val> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0247–#0247
tail -n <n> <path>python - <script>Requested file and log inspection and source searches related to device memory.
1 call · #0248–#0248
sed -n <val> <path>rg -n <val> <path>Requested repository inspection related to attention kernels.
1 call · #0249–#0249
git diff <flag> <args>Requested file and log inspection related to benchmark & validation setup.
1 call · #0250–#0250
tail -n <n> <path>Requested code edits related to attention kernels.
1 call · #0251–#0251
Apply patch <patch>Requested file and log inspection related to benchmark & validation setup.
1 call · #0252–#0252
tail -n <n> <path>Requested source searches and script or workload execution related to runtime processes.
1 call · #0253–#0253
rg -n -A <n> <val> <path>python - <script>Requested script or workload execution related to benchmark & validation setup.
1 call · #0254–#0254
python <script> <val> <val> > <path> <n> >& <path>Requested repository inspection and script or workload execution related to attention kernels.
1 call · #0255–#0255
git diff --checkpython - <script>Requested repository inspection, runtime inspection and source searches related to batching & scheduling.
1 call · #0256–#0256
git <val> <val> <flag>ps <flag> <args>rg <val>cut -c <val>Requested file and log inspection and workspace inspection related to benchmark & validation setup.
1 call · #0257–#0257
tail -n <n> <path>ls -l -a <val>Requested script or workload execution and environment setup or inspection related to task requirements.
1 call · #0258–#0258
python - <script>env <vars> bash <script> > <path> <n> >& <path>Requested file and log inspection related to benchmark & validation setup.
1 call · #0259–#0259
tail -n <n> <path>Requested script or workload execution and file and log inspection related to source & workspace.
1 call · #0260–#0260
bash <script> > <path> <n> >& <path>cat <path>Requested script or workload execution and repository inspection related to runtime processes.
1 call · #0261–#0261
python - <script>git diff --checkgit status --short03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: 340db9201005fc64635bb25db1d2538f955761c3
@@ -89,6 +89,8 @@ class ForwardMetadata: # swa attention mask for graph mode decode swa_mask: Optional[torch.Tensor] = None+ # Mask the unused suffix when graph decode lengths are rounded to pages.+ decode_mask: Optional[torch.Tensor] = None # prefix cache prefix_lens: Optional[torch.Tensor] = None@@ -380,6 +382,19 @@ class AscendAttnBackend(AttentionBackend): self.dllm_block_size = self.dllm_config.block_size self.attn_cp_size = model_runner.ps.attn_cp_size+ # Plain decode can mask a page's unused suffix on device, keeping the+ # FIA host length bindings unchanged until a request crosses a page.+ self.use_graph_seq_len_padding = (+ type(self) is AscendAttnBackend+ and not self.use_mla+ and not self.is_hybrid_swa+ and not self.use_sliding_window_kv_pool+ and not self.is_dllm_model+ and not self.enable_torch_compile+ and not self.use_alibi+ and not model_runner.model_config.is_encoder_decoder+ and model_runner.spec_algorithm.is_none()+ ) def _is_swa_layer(self, layer: RadixAttention) -> bool: return (@@ -560,6 +575,18 @@ class AscendAttnBackend(AttentionBackend): device=self.device, ), }+ if self.use_graph_seq_len_padding:+ padded_context_len = (+ self.graph_metadata["block_tables"].shape[1] * self.page_size+ )+ self.graph_metadata["decode_mask"] = torch.ones(+ (max_bs, 1, 1, padded_context_len),+ dtype=torch.bool,+ device=self.device,+ )+ self.graph_metadata["decode_indices"] = torch.arange(+ padded_context_len, dtype=torch.int32, device=self.device+ ) if self.is_hybrid_swa: self.graph_metadata["block_tables_swa"] = torch.empty( (max_bs, total_context_len // self.page_size),@@ -607,6 +634,8 @@ class AscendAttnBackend(AttentionBackend): """Create and store the per-bs ForwardMetadata for CUDA graph capture.""" metadata = ForwardMetadata() metadata.block_tables = self.graph_metadata["block_tables"][:bs, :]+ if self.use_graph_seq_len_padding:+ metadata.decode_mask = self.graph_metadata["decode_mask"][:bs] if self.is_hybrid_swa: metadata.block_tables_swa = self.graph_metadata["block_tables_swa"][:bs, :] metadata.swa_mask = self.graph_metadata["swa_mask"][:bs, :, :]@@ -731,6 +760,14 @@ class AscendAttnBackend(AttentionBackend): elif forward_mode.is_decode_or_idle() and spec_info is not None: seq_lens = seq_lens + self.speculative_step_offset_npu metadata.seq_lens[:bs].copy_(seq_lens[:bs])+ if metadata.decode_mask is not None:+ # Keep true token lengths on device while the graph's host length+ # bindings advance only at cache-page boundaries.+ torch.ge(+ self.graph_metadata["decode_indices"][None, :],+ metadata.seq_lens[:bs, None],+ out=metadata.decode_mask[:, 0, 0, :],+ ) self.forward_metadata = metadata @@ -2336,7 +2373,7 @@ class AscendAttnBackend(AttentionBackend): attn_mask = self.forward_metadata.swa_mask else: block_tables = self.forward_metadata.block_tables- attn_mask = None+ attn_mask = self.forward_metadata.decode_mask k_cache = self.token_to_kv_pool.get_key_buffer(layer.layer_id).view( -1, self.page_size, layer.tp_k_head_num * layer.qk_head_dim )@@ -12,8 +12,9 @@ non-NPU hosts. from __future__ import annotations -import threading+from concurrent.futures import ThreadPoolExecutor from contextlib import AbstractContextManager, contextmanager+from copy import deepcopy from functools import partial from typing import TYPE_CHECKING, Any, Callable, Dict, Optional @@ -63,6 +64,9 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): self._enable_torch_compile = getattr( cuda_graph_runner, "enable_torch_compile", False )+ self._update_executor: Optional[ThreadPoolExecutor] = None+ self._padded_input_graphs = set()+ self._cached_update_inputs: Dict[Any, Any] = {} @contextmanager def capture_session(self, stream):@@ -125,6 +129,29 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): self._graphs[shape_key] = graph self._outputs[shape_key] = out+ self._cached_update_inputs.pop(shape_key, None)+ self._padded_input_graphs.discard(shape_key)+ records = graph.graph_dispatch_mode.graph_dispatch_records+ # Only round lengths when every dynamic operator consumes the decode+ # mask. Other attention operators retain their exact host lengths.+ if records and all(+ record.op_cache_entry.__name__+ == "npu_fused_infer_attention_score.out"+ and record.kwargs.get("atten_mask") is not None+ for record in records+ ):+ self._padded_input_graphs.add(shape_key)++ def supports_padded_sequence_lengths(self, shape_key: ShapeKey) -> bool:+ return shape_key in self._padded_input_graphs++ @staticmethod+ def _signal_input_bindings(graph) -> None:+ mode = graph.graph_dispatch_mode+ # Replay resets these events, so even unchanged bindings need a fresh+ # signal for every recorded operator on every replay.+ for record in mode.graph_dispatch_records:+ record.event.record(mode.update_stream) def can_run(self, forward_batch: ForwardBatch, shape_key: ShapeKey) -> bool: return shape_key in self._graphs@@ -149,6 +176,7 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): attr_name: str = None, attr_type: Any = None, cpu_update_input: list = None,+ cache_input_bindings: bool = False, ) -> Any: """Rebind seq_lens on the recorded NPU graph in a background thread, then replay. Used when the model is not deepseek-nsa.@@ -158,6 +186,10 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend): Constructs cpu_update_input=[{attr_name: seq_lens}] internally. 2. cpu_update_input: A list of {attr_name: seq_lens} dicts, one per speculative step. Used by EAGLE draft runners.++ cache_input_bindings is for masked decode attention with Python-list+ lengths. When the lengths match the last update, signal the captured+ events without rebuilding the same operator bindings. """ if cpu_update_input is None: if isinstance(attr_type, torch.Tensor):@@ -165,18 +197,43 @@ 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()- graph.replay()- thread.join()+ if self._update_executor is None:+ # Device selection is thread-local. Reuse one device-bound worker+ # instead of creating a thread and initializing its NPU context on+ # every decode step. Updates still overlap graph execution.+ self._update_executor = ThreadPoolExecutor(+ max_workers=1,+ thread_name_prefix="sglang-npu-graph-update",+ initializer=self._device_module.set_device,+ initargs=(self._device_id,),+ )+ if (+ cache_input_bindings+ and self._cached_update_inputs.get(shape_key) == cpu_update_input+ ):+ update = self._update_executor.submit(self._signal_input_bindings, graph)+ else:+ update = self._update_executor.submit(+ graph.update, cpu_update_input=cpu_update_input+ )+ try:+ graph.replay()+ finally:+ # Drain the update even when replay fails, and propagate worker+ # errors rather than silently losing them in a background thread.+ update.result()+ if cache_input_bindings:+ self._cached_update_inputs[shape_key] = deepcopy(cpu_update_input)+ else:+ self._cached_update_inputs.pop(shape_key, None) return self._outputs[shape_key] def cleanup(self) -> None:+ if self._update_executor is not None:+ self._update_executor.shutdown(wait=True)+ self._update_executor = None self._graphs.clear() self._outputs.clear()+ self._padded_input_graphs.clear()+ self._cached_update_inputs.clear() self._pool = None@@ -239,6 +239,10 @@ class NPUGraphRunner(DecodeCudaGraphRunner): is_deepseek_dsa(self.model_runner.model_config.hf_config) or is_deepseek_v4(self.model_runner.model_config.hf_config) ):+ # The device-to-host read also completes the preceding replay.+ # Preserve it: cached-binding signals must follow that replay's+ # event resets, and the request-table snapshot must finish before+ # the scheduler writes the next batch's shared inputs. 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)@@ -246,11 +250,22 @@ class NPUGraphRunner(DecodeCudaGraphRunner): seq_lens = forward_batch.seq_lens.cpu().tolist() + [0] * ( self.bs - self.raw_bs )+ cache_input_bindings = (+ getattr(self.attn_backend, "use_graph_seq_len_padding", False)+ and self.backend.supports_padded_sequence_lengths(graph_key)+ )+ if cache_input_bindings:+ page_size = self.attn_backend.page_size+ seq_lens = [+ (length + page_size - 1) // page_size * page_size+ for length in seq_lens+ ] output = self.backend.replay_with_input_update( graph_key, seq_lens=seq_lens, attr_name=self._get_update_attr_name(), attr_type=self._get_update_attr_type(),+ cache_input_bindings=cache_input_bindings, ) else: output = self.backend.replay(graph_key, forward_batch)@@ -0,0 +1,201 @@+"""CPU tests for NPU graph updates, binding reuse, and worker lifetime."""++import threading+import unittest+from contextlib import nullcontext+from types import SimpleNamespace+from unittest.mock import Mock, patch++import torch++from sglang.srt.hardware_backend.npu.graph_runner.npu_cudagraph_backend import (+ NPUCudaGraphBackend,+)+++class TestNPUCudaGraphBackend(unittest.TestCase):+ def setUp(self):+ self.device = Mock()+ self.device.current_device.return_value = 3+ self.backend = NPUCudaGraphBackend(+ SimpleNamespace(+ device_module=self.device,+ model_runner=SimpleNamespace(tp_group=None),+ )+ )+ self.addCleanup(self.backend.cleanup)+ self.graph = Mock()+ self.output = object()+ self.backend._graphs[1] = self.graph+ self.backend._outputs[1] = self.output++ def test_reuses_device_bound_worker_and_joins_on_cleanup(self):+ workers = []+ inputs = []++ def update(*, cpu_update_input):+ workers.append(threading.current_thread())+ inputs.append(cpu_update_input)++ self.graph.update.side_effect = update+ for lengths in ([13], [14], [15]):+ self.assertIs(+ self.backend.replay_with_input_update(+ 1, lengths, "actual_seq_lengths_kv", []+ ),+ self.output,+ )+ self.assertTrue(all(worker is workers[0] for worker in workers))+ self.device.set_device.assert_called_once_with(3)+ self.assertEqual(+ inputs,+ [[{"actual_seq_lengths_kv": [length]}] for length in (13, 14, 15)],+ )+ self.backend.cleanup()+ self.assertFalse(workers[0].is_alive())+ self.assertFalse(self.backend._graphs)++ def test_update_overlaps_replay_and_finishes_before_return(self):+ replay_started = threading.Event()+ update_finished = threading.Event()++ def update(*, cpu_update_input):+ if not replay_started.wait(timeout=5):+ raise RuntimeError("Replay did not overlap the graph update")+ update_finished.set()++ self.graph.update.side_effect = update+ self.graph.replay.side_effect = replay_started.set+ self.backend.replay_with_input_update(1, [13], "actual_seq_lengths_kv", [])+ self.assertTrue(update_finished.is_set())++ def test_update_failure_reaches_caller(self):+ self.graph.update.side_effect = ValueError("invalid graph update")+ with self.assertRaisesRegex(ValueError, "invalid graph update"):+ self.backend.replay_with_input_update(1, [13], "actual_seq_lengths_kv", [])++ def test_replay_failure_still_waits_for_update(self):+ replay_started = threading.Event()+ update_finished = threading.Event()++ def update(*, cpu_update_input):+ if not replay_started.wait(timeout=5):+ raise RuntimeError("Replay did not start")+ update_finished.set()++ def replay():+ replay_started.set()+ raise ValueError("invalid graph replay")++ self.graph.update.side_effect = update+ self.graph.replay.side_effect = replay+ with self.assertRaisesRegex(ValueError, "invalid graph replay"):+ self.backend.replay_with_input_update(1, [13], "actual_seq_lengths_kv", [])+ self.assertTrue(update_finished.is_set())++ def test_tensor_and_multistep_update_inputs(self):+ self.backend.replay_with_input_update(1, [7, 8], "context_lens", torch.Tensor())+ tensor = self.graph.update.call_args.kwargs["cpu_update_input"][0][+ "context_lens"+ ]+ self.assertEqual(tensor.dtype, torch.int32)+ self.assertEqual(tensor.device.type, "cpu")+ self.assertEqual(tensor.tolist(), [7, 8])++ inputs = [{"actual_seq_lengths_kv": [7]}, {"actual_seq_lengths_kv": [8]}]+ self.backend.replay_with_input_update(1, None, cpu_update_input=inputs)+ self.assertIs(self.graph.update.call_args.kwargs["cpu_update_input"], inputs)++ def test_reuses_bindings_and_signals_every_record(self):+ stream = object()+ events = [Mock(), Mock()]+ self.graph.graph_dispatch_mode = SimpleNamespace(+ update_stream=stream,+ graph_dispatch_records=[SimpleNamespace(event=event) for event in events],+ )+ for _ in range(3):+ self.backend.replay_with_input_update(+ 1, [128, 256], "actual_seq_lengths_kv", [], cache_input_bindings=True+ )+ self.graph.update.assert_called_once()+ self.assertEqual(self.graph.replay.call_count, 3)+ for event in events:+ self.assertEqual(event.record.call_count, 2)+ event.record.assert_called_with(stream)++ def test_binding_cache_snapshots_inputs_and_invalidates_uncached_updates(self):+ lengths = [128, 256]+ self.backend.replay_with_input_update(+ 1, lengths, "actual_seq_lengths_kv", [], cache_input_bindings=True+ )+ lengths[0] = 256+ self.backend.replay_with_input_update(+ 1, lengths, "actual_seq_lengths_kv", [], cache_input_bindings=True+ )+ self.assertEqual(self.graph.update.call_count, 2)+ self.backend.replay_with_input_update(+ 1, [384, 256], "actual_seq_lengths_kv", []+ )+ self.backend.replay_with_input_update(+ 1, lengths, "actual_seq_lengths_kv", [], cache_input_bindings=True+ )+ self.assertEqual(self.graph.update.call_count, 4)+ self.backend.cleanup()+ self.assertFalse(self.backend._cached_update_inputs)++ def test_binding_cache_is_per_graph(self):+ other_graph = Mock()+ self.backend._graphs[2] = other_graph+ self.backend._outputs[2] = object()+ for key in (1, 2):+ self.backend.replay_with_input_update(+ key, [128], "actual_seq_lengths_kv", [], cache_input_bindings=True+ )+ self.graph.update.assert_called_once()+ other_graph.update.assert_called_once()++ def test_recapture_checks_all_operators_and_invalidates_bindings(self):+ self.backend._tp_group = Mock()+ masked = SimpleNamespace(+ op_cache_entry=SimpleNamespace(+ __name__="npu_fused_infer_attention_score.out"+ ),+ kwargs={"atten_mask": object()},+ )+ unmasked = SimpleNamespace(+ op_cache_entry=masked.op_cache_entry, kwargs={"atten_mask": None}+ )+ other = SimpleNamespace(+ op_cache_entry=SimpleNamespace(__name__="other_attention.out"),+ kwargs={"atten_mask": object()},+ )+ for records, supported in (+ ([masked], True),+ ([masked, unmasked], False),+ ([masked, other], False),+ ([], False),+ ):+ with self.subTest(supported=supported, records=len(records)):+ graph = SimpleNamespace(+ graph_dispatch_mode=SimpleNamespace(+ graph_dispatch_records=records+ )+ )+ npu = SimpleNamespace(+ NPUGraph=lambda: graph,+ graph=lambda *args, **kwargs: nullcontext(),+ )+ self.backend._cached_update_inputs[1] = [{"old_lengths": [128]}]+ with (+ patch.dict("sys.modules", {"torch_npu": Mock()}),+ patch.object(torch, "npu", npu, create=True),+ ):+ self.backend.capture_one(1, lambda: self.output)+ self.assertEqual(+ self.backend.supports_padded_sequence_lengths(1), supported+ )+ self.assertNotIn(1, self.backend._cached_update_inputs)+++if __name__ == "__main__":+ unittest.main()