Inspect · Source & workspace
Requested file and log inspection and workspace inspection related to source & workspace.
4 calls · #0001–#0004
Read <path>ls <path>Kimi K3 · Training
Qwen3-4B CodeOpt packed DP2 training 2dev · 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 file and log inspection and workspace inspection related to source & workspace.
4 calls · #0001–#0004
Read <path>ls <path>Requested file and log inspection related to attention kernels.
1 call · #0005–#0005
Read <path>Requested workspace inspection related to optimizer & gradients.
1 call · #0006–#0006
ls <path> <path> <path> <path> <path>Requested workspace inspection related to source & workspace.
1 call · #0007–#0007
ls <path>ls <path> <n> > <path>Requested source searches related to attention kernels.
1 call · #0008–#0008
Search <pattern> <path>Requested workspace inspection related to parallelism & communication.
1 call · #0009–#0009
ls <path> <path> <path> <path> <n> > <path>Requested source searches and file and log inspection related to attention kernels.
8 calls · #0010–#0017
Search <pattern> <path>Read <path>Requested file and log inspection related to source & workspace.
2 calls · #0018–#0019
Read <path>Requested dependency and build commands, file and log inspection and script or workload execution related to dependencies & build setup.
1 call · #0020–#0020
pip show <val> <n> > <path>head -n <n>python -c <script> <n> > <path>ls <path> <n> > <path>headRequested source searches related to source & workspace.
1 call · #0021–#0021
Search <pattern> <path>Requested service requests and workspace inspection related to source & workspace.
1 call · #0022–#0022
cd <path>curl <flag> <args>ls -l -a <val>Requested file and log inspection related to optimizer & gradients.
1 call · #0023–#0023
Read <path>Requested file and log inspection and service requests related to source & workspace.
2 calls · #0024–#0025
cd <path>cat <val>echocurl <flag> <args>head -n <n>echo <flag><command> <args>Requested dependency and build commands and file and log inspection related to dependencies & build setup.
1 call · #0026–#0026
cd <path>pip <val> <val> --no-deps <flag> <args>tail -n <n>pip <val> <val> --no-deps -d <path> <n> >& <path>Requested source searches, file and log inspection and repository inspection related to dependencies & build setup.
1 call · #0027–#0027
grep -i <val> <path>head -n <n>grep -r -i <val> <path>git -C <path> <val> --onelineRequested dependency and build commands, file and log inspection and workspace inspection related to dependencies & build setup.
1 call · #0028–#0028
cd <path>pip <val> <val> --no-deps <flag> <args>tail -n <n>ls <path>Requested workspace inspection, file and log inspection and script or workload execution related to source & workspace.
4 calls · #0029–#0032
cd <path>unzip -q <val> -d <val>ls <path>diff <flag> <args>head -n <n>python -c <script>grep -v <val>echo <val>grep -c <val>Requested service requests and file and log inspection related to source & workspace.
2 calls · #0033–#0034
cd <path>curl <flag> <args>tar <flag> <args>head -n <n>Requested workspace inspection, file and log inspection and workspace file updates related to source & workspace.
7 calls · #0035–#0041
cd <path>ls -l -a <val>file <val>head -c <n> <val>rm -f <val>git <val> <flag> <args>tail -n <n>ls <val> <n> > <path>head -n <n>env <vars> git <val> <flag> <args>diff <flag> <args>grep -v <path>grep -v <val>diff -u <path> <path>wc -lRequested source searches, file and log inspection and workspace inspection related to dependencies & build setup.
1 call · #0042–#0042
grep -E <val> <path>head -n <n>cat <path> <n> > <path>ls <path> <n> > <path>Requested environment setup or inspection, file and log inspection and workspace inspection related to source & workspace.
1 call · #0043–#0043
cd <path>env <vars> git <val> <flag> <args>tail -n <n>ls <val>head -n <n>Requested environment setup or inspection, file and log inspection and source searches related to dependencies & build setup.
1 call · #0044–#0044
cd <path>env <vars> git <val> <flag> <args>tail -n <n>grep <val> <path>head -n <n>Requested environment setup or inspection, file and log inspection and source restoration related to dependencies & build setup.
1 call · #0045–#0045
cd <path>env <vars> git fetch <flag> <args>tail -n <n>git checkout -q <val>grep <val> <path>head -n <n>diff <flag> <args>grep -v <val>grep <val>Requested source restoration, environment setup or inspection and file and log inspection related to source & workspace.
1 call · #0046–#0046
cd <path>git checkout -q <val>env <vars> git <val> <flag> <args>tail -n <n>ls <path>head -n <n>Requested source searches related to attention kernels.
1 call · #0047–#0047
cd <path><command> <args>grep -c <val>echo <val>diff <path> <path> > <path> <n> >& <path>Requested environment setup or inspection, file and log inspection and repository inspection related to source & workspace.
6 calls · #0048–#0053
cd <path>env <vars> git fetch <flag> <args>tail -n <n>git log <flag> <args>head -n <n>rm -rf <val>env <vars> git <val> <flag> <args>cd <val>git log --onelinewc -lecho <flag>echo <val>headRequested source restoration, file and log inspection and source searches related to source & workspace.
1 call · #0054–#0054
cd <path>git checkout -q <val> <n> >& <path>tail -n <n>diff <flag> <args>grep <val>head -n <n>Requested source searches and file and log inspection related to source & workspace.
3 calls · #0055–#0057
cd <path>diff <flag> <args>grep <val>sed <path>head -n <n>diff -q <path> <path>wc -lRequested source searches related to attention kernels.
1 call · #0058–#0058
cd <path><command> <args>grep -c <val>echo <val>Requested file and log inspection related to parallelism & communication.
1 call · #0059–#0059
cd <path><command> <args>diff -u <path> <path>head -n <n>Requested file and log inspection and repository inspection related to source & workspace.
2 calls · #0060–#0061
cd <path>diff -u <path> <path>head -n <n>git log <flag> <args>catechowc -lRequested repository inspection, file and log inspection and workspace file updates related to attention kernels.
3 calls · #0062–#0064
cd <path>git log --format <val> <flag> <args>head -n <n>mkdir -p <path><command> <args>grep -c <val>echo <val>Requested repository inspection, file and log inspection and workspace file updates related to source & workspace.
3 calls · #0065–#0067
cd <path>git show <path> > <path>diff -u <path> <path>cat > <path> <script>chmod <val> <path><script> <args>diff < <path> <val> <path> <path>echo <val>Requested script or workload execution related to attention kernels.
1 call · #0068–#0068
<script> <args>Requested repository inspection and file and log inspection related to source & workspace.
1 call · #0069–#0069
cd <path>git log <flag> <args>headecho <val>git log --format <val> <flag> <args>head -n <n>Requested script or workload execution related to attention kernels.
1 call · #0070–#0070
cd <path><script> <args>Requested script or workload execution related to source & workspace.
1 call · #0071–#0071
cd <path><script> <args>Requested repository inspection and file and log inspection related to source & workspace.
2 calls · #0072–#0073
cd <path>git show <path> > <path>diff -u <path> <path>head -n <n>tail -n <n>Requested repository inspection and file and log inspection related to attention kernels.
3 calls · #0074–#0076
cd <path>git show <path> > <path>diff -u <path> <path>head -n <n>sed -n <val>Requested environment setup or inspection, file and log inspection and repository inspection related to source & workspace.
1 call · #0077–#0077
cd <path>env <vars> git <val> <flag> <args>tail -n <n>cd <val>git log <flag> <args>Requested file and log inspection, workspace file updates and script or workload execution related to attention kernels.
2 calls · #0078–#0079
cd <path>cat > <path> <script>chmod <val> <path><script> <args>git log <flag> <args>head -n <n>ls <path> <n> > <path>Requested tool activity related to attention kernels.
1 call · #0080–#0080
cd <path><command> <args>Requested file and log inspection and workspace file updates related to attention kernels.
1 call · #0081–#0081
cd <path>cat > <path> <script>chmod <val> <path><command> <args>Requested environment setup or inspection related to source & workspace.
1 call · #0082–#0082
du <flag> <args>cd <path>env <vars> git <val> -q <flag> <args>echo <val>Requested repository inspection, environment setup or inspection and file and log inspection related to source & workspace.
7 calls · #0083–#0089
cd <path>git <val> <val> <val> <url>env <vars> git fetch -q <flag> <args>tail -n <n>git log --format <val> <flag> <args>head -n <n>echo <flag>git log <flag> <args><command> <args>wc <flag>echo <val>sort <flag> <args>git diff <flag> <args>git diff <val> <val> <flag> <args>sort -ngrep <val>wc -lgrep -v <val>Requested repository inspection and file and log inspection related to attention kernels.
1 call · #0090–#0090
cd <path>git diff <val> <val> <flag> <args>head -n <n>Requested file and log inspection and workspace file updates related to optimizer & gradients.
1 call · #0091–#0091
cd <path>cat > <path> <script>chmod <val> <path><command> <args>Requested code edits and script or workload execution related to attention kernels.
1 call · #0092–#0092
cd <path>sed -i <path> <path><script> <args>Requested repository inspection, file and log inspection and workspace inspection related to source & workspace.
4 calls · #0093–#0096
cd <path>git log <flag> <args>head -n <n>ls <path> <n> > <path>ls <path>echo <val>Read <path>head -n <n> <path>Requested script or workload execution related to source & workspace.
1 call · #0097–#0097
cd <path><script> <args>Requested file and log inspection related to source & workspace.
1 call · #0098–#0098
cd <path><command> <args>wc <flag>echo <val>sort -u <flag> <args>head -n <n>Requested script or workload execution related to attention kernels.
1 call · #0099–#0099
cd <path><script> <args>Requested script or workload execution related to runtime processes.
1 call · #0100–#0100
cd <path><script> <args>Requested repository inspection, source searches and environment setup or inspection related to source & workspace.
15 calls · #0101–#0115
cd <path>git show <path>grep -c <val>env <vars> git <val> <flag> <args>awk <val>tail -n <n>env <vars> git fetch -q <flag> <args>git log --format <val> <flag> <args>echo <val>git diff <flag> <args>wc -lhead -n <n><command> <args>wc <flag>sort -ngrep <path>grep -v <path>grep <val>grep -n <val>grep -v <val>headls <path> <n> > <path>grep -i <val>grep -i -E <val>Requested file and log inspection related to attention kernels.
1 call · #0116–#0116
Read <path>Requested workspace inspection related to source & workspace.
1 call · #0117–#0117
ls <path> <path> <n> > <path>Requested file and log inspection related to attention kernels.
1 call · #0118–#0118
Read <path>Requested environment setup or inspection, file and log inspection and repository inspection related to source & workspace.
3 calls · #0119–#0121
cd <path>env <vars> git fetch -q <flag> <args>tail -n <n>git log <flag> <args>head -n <n>git <val> <val> <val>git fetch -q <flag> <args>git log --format <val> <flag> <args>git fetch -q <val> <val> <n> >& <path>Requested service requests, source searches and file and log inspection related to source & workspace.
1 call · #0122–#0122
cd <path>curl <flag> <args>grep -n <val> <path>head -n <n>Requested repository inspection, file and log inspection and source searches related to source & workspace.
11 calls · #0123–#0133
cd <path>git diff <flag> <args>head -n <n>echo <val>wc -lgrep -n <val> <path>headsed -n <val> <path>Search <pattern> <path>Read <path>ls <path> <path> <n> > <path>Requested source searches related to attention kernels.
1 call · #0134–#0134
Search <pattern> <path>Requested file and log inspection and source searches related to source & workspace.
4 calls · #0135–#0138
Read <path>Search <pattern> <path>Requested file and log inspection related to attention kernels.
1 call · #0139–#0139
Read <path>Requested repository inspection, file and log inspection and source searches related to source & workspace.
7 calls · #0140–#0146
git -C <path> <val> <flag>headecho <val>Read <path>Search <pattern> <path>sed -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0147–#0147
Read <path>Requested workspace inspection, file and log inspection and source searches related to source & workspace.
6 calls · #0148–#0153
ls -l -a <path> <n> > <path>headfind <path> -maxdepth <n> <n> > <path>head -n <n>Search <pattern> <path>cd <path>echo <val>echo <path>find <path> <path> -maxdepth <n> -name <val> -o -maxdepth <n> -name <val> <args>ls <path> <n> > <path>grep -n <val> <path>Requested file and log inspection related to device memory.
1 call · #0154–#0154
Read <path>Requested workspace inspection related to source & workspace.
1 call · #0155–#0155
echo <val>ls -l -a <val> <n> > <path>Requested file and log inspection related to task requirements.
2 calls · #0156–#0157
Read <path>Requested workspace inspection and file and log inspection related to source & workspace.
6 calls · #0158–#0163
find <val> -type <val>head -n <n>Read <path>Requested file and log inspection related to task requirements.
1 call · #0164–#0164
Read <path>Requested file and log inspection related to checkpoints & weight state.
1 call · #0165–#0165
Read <path>Requested file and log inspection related to source & workspace.
1 call · #0166–#0166
Read <path>Requested environment setup or inspection and source searches related to source & workspace.
1 call · #0167–#0167
envgrep -E <val>sortRequested file and log inspection, script or workload execution and repository inspection related to source & workspace.
2 calls · #0168–#0169
cat <path>python3 -m <module>head -n <n>date -ucd <path>git log --oneline <flag> <args>git status --short <n> > <path>echo <flag>Requested script or workload execution related to benchmark & validation setup.
1 call · #0170–#0170
bash <script> > <path> <n> >& <path>echo <val>Requested workspace inspection, file and log inspection and task coordination related to source & workspace.
2 calls · #0171–#0172
ls <path>head -n <n>echo <flag>headwc -l <path>Update task list <tasks>Requested task coordination related to source & workspace.
1 call · #0173–#0173
Delegate <task>Delegated by Main agent at call #0173.
Only the returned summary is retained; child tool events are not available.
Requested file and log inspection related to source & workspace.
1 call · #0174–#0174
Read <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0175–#0175
cat <path>echo <flag>python3 -m <module> <path> <n> > <path>head -n <n>Requested script or workload execution and workspace file updates related to benchmark & validation setup.
1 call · #0176–#0176
bash <script> > <path> <n> >& <path>echo <val>cp <path> <path> <n> > <path>Requested file and log inspection related to attention kernels.
1 call · #0177–#0177
Read <path>Requested source searches and file and log inspection related to source & workspace.
5 calls · #0178–#0182
grep -n <val> <path>head -n <n>Read <path>Requested file and log inspection, workspace inspection and source searches related to attention kernels.
6 calls · #0183–#0188
Read <path>ls <path> <path>echo <flag>grep -r -n <val> <path> <path> <n> > <path>head -n <n>Search <pattern> <path>Requested task coordination and source searches related to source & workspace.
2 calls · #0189–#0190
Update task list <tasks>Search <pattern> <path>Requested file and log inspection related to attention kernels.
1 call · #0191–#0191
Read <path>Requested source searches and file and log inspection related to source & workspace.
1 call · #0192–#0192
grep -n <val> <path>head -n <n>Requested workspace inspection, file and log inspection and source searches related to attention kernels.
4 calls · #0193–#0196
find <path> -maxdepth <n> -name <path>headecho <flag>sed -n <val> <path>grep -n <val> -A <n> <path>grep -n <val> <flag> <args>head -n <n>Requested source searches related to source & workspace.
1 call · #0197–#0197
grep -n <val> <path>Requested file and log inspection related to attention kernels.
1 call · #0198–#0198
sed -n <val> <path>Requested file and log inspection and source searches related to source & workspace.
3 calls · #0199–#0201
Read <path>grep -n <val> <path> <path>Requested file and log inspection and script or workload execution related to benchmark & validation setup.
1 call · #0202–#0202
tail -n <n> <path>python3 -c <script>Requested source searches and file and log inspection related to source & workspace.
1 call · #0203–#0203
grep -r -n <val> <path> <path> <path> --include <path>grep -v <val>head -n <n>Requested file and log inspection and workspace inspection related to attention kernels.
3 calls · #0204–#0206
sed -n <val> <path> <n> > <path>ls <path>sed -n <val> <path>echo <val>Read <path>Requested task coordination related to source & workspace.
1 call · #0207–#0207
Update task list <tasks>Requested file and log inspection related to benchmark & validation setup.
1 call · #0208–#0208
tail -n <n> <path>cut <flag>echo <val>Requested source searches and file and log inspection related to runtime processes.
1 call · #0209–#0209
grep -r -n <val> <path>headecho <flag>grep -n <val> -A <n> <path>head -n <n>Requested file and log inspection and source searches related to source & workspace.
2 calls · #0210–#0211
Read <path>grep -n <val> <path>sed -n <val>Requested source searches and file and log inspection related to parallelism & communication.
2 calls · #0212–#0213
grep -n <val> <path>headRead <path>Requested source searches and file and log inspection related to runtime processes.
1 call · #0214–#0214
grep -n <val> <path>headsed -n <val> <path>Requested source searches and file and log inspection related to source & workspace.
4 calls · #0215–#0218
grep -n <val> -A <n> <path>Search <pattern> <path>grep -r -n <val> <path>headsed -n <val> <path>Requested file and log inspection related to parallelism & communication.
1 call · #0219–#0219
Read <path>Requested source searches and file and log inspection related to attention kernels.
1 call · #0220–#0220
grep -n <val> -A <n> <path>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0221–#0221
Read <path>Requested source searches and file and log inspection related to attention kernels.
5 calls · #0222–#0226
grep -r -n <val> <path>head -n <n>echo <flag>headRead <path>grep -n <val> <path>Requested file and log inspection related to source & workspace.
1 call · #0227–#0227
Read <path>Requested code edits related to source & workspace.
8 calls · #0228–#0235
Edit <path>Requested file and log inspection related to attention kernels.
1 call · #0236–#0236
Read <path>Requested source searches and file and log inspection related to source & workspace.
3 calls · #0237–#0239
grep -r -n <val> <path> <path> <path> <n> > <path>head -n <n>grep -r -n <val> <path> <path> <n> > <path>headecho <flag>grep -r -n <val> <path>Requested code edits related to attention kernels.
2 calls · #0240–#0241
Edit <path>Requested task coordination related to source & workspace.
1 call · #0242–#0242
Update task list <tasks>Requested code edits related to attention kernels.
2 calls · #0243–#0244
Edit <path>Requested code edits related to parallelism & communication.
2 calls · #0245–#0246
Edit <path>Requested script or workload execution, file and log inspection and workspace inspection related to benchmark & validation setup.
2 calls · #0247–#0248
python3 -c <script> <n> > <path>head -n <n>bash <script> > <path> <n> >& <path>python3 -c <script>ls <val> <n> > <path>Requested code edits related to source & workspace.
2 calls · #0249–#0250
Write <path>Requested workspace file updates and script or workload execution related to benchmark & validation setup.
1 call · #0251–#0251
chmod <val> <path>python3 <script> <val> <script> <val> <n> > <path> <n> >& <path>echo <val>Requested source searches and file and log inspection related to runtime processes.
1 call · #0252–#0252
grep -n <val> -A <n> <path>head -n <n>grep -r -n <val> <path> <path> <n> > <path>headRequested source searches, file and log inspection and workspace inspection related to source & workspace.
1 call · #0253–#0253
grep -r -n <val> <path> <n> > <path>head -n <n>headfind <path> -name <val>grep -n <val> <path>Requested source searches and file and log inspection related to runtime processes.
1 call · #0254–#0254
grep -n <val> <path>headecho <flag>grep -r -n <val> <path> <n> > <path>head -n <n>grep -r -n <val> <path> <path> -rRequested file and log inspection related to source & workspace.
1 call · #0255–#0255
Read task output <task>Requested file and log inspection, source searches and execution waits related to source & workspace.
2 calls · #0256–#0257
tail -n <n> <path> <n> > <path>cut <flag>echo <path>grep -c <val> <path> <n> > <path>grep <val> <path>sleep <n>tail -n <n> <path>Requested source searches, workspace inspection and file and log inspection related to benchmark & validation setup.
1 call · #0258–#0258
grep -o <val> <path>grep -o <val> <path> <n> > <path>ls <val>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0259–#0259
Read <path>Requested code edits related to source & workspace.
1 call · #0260–#0260
Edit <path>Requested script or workload execution and source searches related to benchmark & validation setup.
1 call · #0261–#0261
python3 <script> <val> <script> <val> <n> > <path> <n> >& <path>echo <val>grep -E <val> <path>cut <flag>Requested source searches and file and log inspection related to parallelism & communication.
1 call · #0262–#0262
grep -n <val> <path>head -n <n>echo <flag>Requested file and log inspection related to source & workspace.
1 call · #0263–#0263
sed -n <val> <path>Requested source searches and file and log inspection related to parallelism & communication.
2 calls · #0264–#0265
grep -n <val> <path>headgrep -r -n <val> <path> <n> > <path>head -n <n>sed -n <val> <path>grep -n <val> -A <n> <path>Requested file and log inspection related to source & workspace.
1 call · #0266–#0266
Read task output <task>Requested source searches and file and log inspection related to source & workspace.
6 calls · #0267–#0272
grep -n <val> -A <n> <path>head -n <n>cat <path>grep -n <val>grep -r -n <val> <path>grep -n <val> <path>sed -n <val>grep -r -n <val> -A <n> <path>headRequested code edits related to source & workspace.
1 call · #0273–#0273
Edit <path>Requested script or workload execution, file and log inspection and execution waits related to benchmark & validation setup.
1 call · #0274–#0274
python3 <script> <val> <script> <val> <n> > <path> <n> >& <path>echo <val>echo <flag>tail -n <n> <path>cut <flag>sleep <n>ps <val>grep -E <val>grep -v <val>headRequested source searches and file and log inspection related to source & workspace.
1 call · #0275–#0275
grep -n <val> -A <n> <path>head -n <n>Requested file and log inspection related to source & workspace.
1 call · #0276–#0276
Read task output <task>Requested execution waits, file and log inspection and runtime inspection related to source & workspace.
2 calls · #0277–#0278
sleep <n>tail -n <n> <path> <n> > <path>cut <flag>cat <path>ps <val>grep -E <val>grep -v <val>wc -lRequested script or workload execution related to benchmark & validation setup.
1 call · #0279–#0279
bash <script> > <path> <n> >& <path>echo <val>Requested source searches and file and log inspection related to parallelism & communication.
1 call · #0280–#0280
grep -r -n <val> <path>head -n <n>grep -n <val> <path>grep -i <val>grep -r -n <val> -A <n> <path>Requested execution waits, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0281–#0281
sleep <n>ls <val>grep <val>tail -n <n> <path> <n> > <path>cut <flag>Requested source searches and file and log inspection related to source & workspace.
1 call · #0282–#0282
grep -r -n <val> <path> <path> <path> --include <path>grep -v <val>headRequested workspace inspection, source searches and file and log inspection related to benchmark & validation setup.
1 call · #0283–#0283
ls <val>grep <val>tail -n <n> <path> <n> > <path>cut <flag>grep -c <val> <path> <n> > <path>Requested task coordination related to source & workspace.
1 call · #0284–#0284
Update task list <tasks>Requested execution waits, workspace inspection and source searches related to benchmark & validation setup.
1 call · #0285–#0285
sleep <n>ls <val>grep <val><command> <args>python3 -m <module> <path>head -n <n>Requested file and log inspection, runtime inspection and source searches related to benchmark & validation setup.
1 call · #0286–#0286
tail -n <n> <path>cut <flag>ps <val>grep -c <val>Requested execution waits, script or workload execution and runtime inspection related to benchmark & validation setup.
2 calls · #0287–#0288
sleep <n><command> <args>python3 -c <script>cut <flag>ps <val>grep -c <val>tail -n <n> <path> <n> > <path>03 / CANDIDATE ARTIFACT
Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.
Base commit: df2ea7fad8e43016b0e2edbf7ce16026496df2ae
@@ -736,6 +736,16 @@ def rotary_forward(self, max_seq_len: int, offset: int = 0, packed_seq: bool = F if self.inv_freq.device.type == 'cpu': # move `inv_freq` to GPU once at the first micro-batch forward pass self.inv_freq = self.inv_freq.to(device=torch.cuda.current_device())+ # The embedding depends only on (max_seq_len, offset, packed_seq) and the+ # module's fixed inv_freq; cache it so repeated micro-batches and layers do+ # not recompute identical values (bit-identical reuse).+ cache_key = (max_seq_len, offset, packed_seq)+ cache = getattr(self, "_mindspeed_rotary_emb_cache", None)+ if cache is None:+ cache = {}+ self._mindspeed_rotary_emb_cache = cache+ elif cache_key in cache:+ return cache[cache_key] seq = ( torch.arange(max_seq_len, device=self.inv_freq.device, dtype=self.inv_freq.dtype) + offset@@ -756,4 +766,5 @@ def rotary_forward(self, max_seq_len: int, offset: int = 0, packed_seq: bool = F # emb [seq_length, .., dim] emb = emb[:, None, None, :] + cache[cache_key] = emb return emb@@ -368,13 +368,19 @@ def _broadcast(item): def broadcast_dynamic(item):+ # Broadcasts over a single-rank tensor-parallel group are identity+ # operations; skip them to avoid two HCCL calls per micro-batch.+ skip_broadcast = mpu.get_tensor_model_parallel_world_size() == 1 if item is not None: item = item.npu() item_len = torch.tensor(item.numel(), device=torch.cuda.current_device())- _broadcast(item_len)- _broadcast(item)+ if not skip_broadcast:+ _broadcast(item_len)+ _broadcast(item) else: item_len = torch.empty((), dtype=torch.int64, device=torch.cuda.current_device())+ if skip_broadcast:+ raise RuntimeError("broadcast_dynamic expects a source item on a single-rank group") _broadcast(item_len) item = torch.empty([item_len.item()], dtype=torch.int64, device=torch.cuda.current_device()) _broadcast(item)Base commit: 72c49a6260c73669678b8f39b1ba41a4789bb555
@@ -127,15 +127,15 @@ class _VocabParallelCrossEntropy(torch.autograd.Function): vocab_parallel_logits, logits_max = VocabParallelCrossEntropy.calculate_logits_max( vocab_parallel_logits )- torch.distributed.all_reduce(- logits_max, op=torch.distributed.ReduceOp.MAX, group=get_tensor_model_parallel_group()- )- # Get the partition's vocab indices get_vocab_range = VocabUtility.vocab_range_from_per_partition_vocab_size partition_vocab_size = vocab_parallel_logits.size()[-1] rank = get_tensor_model_parallel_rank() world_size = get_tensor_model_parallel_world_size()+ if world_size > 1:+ torch.distributed.all_reduce(+ logits_max, op=torch.distributed.ReduceOp.MAX, group=get_tensor_model_parallel_group()+ ) vocab_start_index, vocab_end_index = get_vocab_range(partition_vocab_size, rank, world_size) (target_mask, masked_target_1d, predicted_logits, sum_exp_logits, exp_logits) = (@@ -145,17 +145,18 @@ class _VocabParallelCrossEntropy(torch.autograd.Function): ) # All reduce is needed to get the chunks from other GPUs.- torch.distributed.all_reduce(- predicted_logits,- op=torch.distributed.ReduceOp.SUM,- group=get_tensor_model_parallel_group(),- )+ if world_size > 1:+ torch.distributed.all_reduce(+ predicted_logits,+ op=torch.distributed.ReduceOp.SUM,+ group=get_tensor_model_parallel_group(),+ ) - torch.distributed.all_reduce(- sum_exp_logits,- op=torch.distributed.ReduceOp.SUM,- group=get_tensor_model_parallel_group(),- )+ torch.distributed.all_reduce(+ sum_exp_logits,+ op=torch.distributed.ReduceOp.SUM,+ group=get_tensor_model_parallel_group(),+ ) exp_logits, loss = VocabParallelCrossEntropy.calculate_cross_entropy_loss( exp_logits, predicted_logits, sum_exp_logits@@ -255,15 +255,34 @@ def apply_rotary_pos_emb_bshd( *dims, d = t.shape t = t.reshape(*dims, d // 2, 2).transpose(-2, -1).reshape(*dims, d) - cos_ = (torch.cos(freqs) * _mscale).to(t.dtype)- sin_ = (torch.sin(freqs) * _mscale).to(t.dtype)- + # cos/sin depend only on freqs, the scale and the target dtype. Cache them+ # on the freqs tensor object so that all attention layers sharing the same+ # freqs within a micro-batch reuse a single computation (bit-identical).+ cache_key = (t.dtype, _mscale)+ cos_sin_cache = getattr(freqs, "_mindspeed_cos_sin_cache", None)+ if cos_sin_cache is not None and cache_key in cos_sin_cache:+ cos_, sin_ = cos_sin_cache[cache_key]+ else:+ cos_ = (torch.cos(freqs) * _mscale).to(t.dtype)+ sin_ = (torch.sin(freqs) * _mscale).to(t.dtype)+ if cos_sin_cache is None:+ cos_sin_cache = {}+ try:+ freqs._mindspeed_cos_sin_cache = cos_sin_cache+ except (AttributeError, RuntimeError):+ cos_sin_cache = None+ if cos_sin_cache is not None:+ cos_sin_cache[cache_key] = (cos_, sin_)+ if args.use_fused_rotary_pos_emb: mode = 1 if rotary_interleaved else 0 t = npu_rotary_position_embedding(t.contiguous(), cos_, sin_, mode).to(t.dtype) else: t = (t * cos_) + (_rotate_half(t, rotary_interleaved) * sin_)- ++ if t_pass.numel() == 0:+ # Concatenating an empty trailing slice only copies t; return it as-is.+ return t return torch.cat((t, t_pass), dim=-1) @@ -286,13 +305,26 @@ def apply_rotary_pos_emb_thd( if args.reset_position_ids: position_ids = cu_seqlens.position_ids- block_size, bsz = position_ids.shape- freqs = freqs[position_ids.view(-1)].reshape(block_size, bsz, 1, -1)+ # The gather depends only on (freqs, position_ids); both are constant+ # across attention layers within a micro-batch, so cache the result on+ # the packed-seq-params carrier (bit-identical reuse).+ gathered = getattr(cu_seqlens, "_mindspeed_gathered_freqs", None)+ if gathered is not None and gathered[0] is freqs:+ freqs = gathered[1]+ else:+ block_size, bsz = position_ids.shape+ gathered_freqs = freqs[position_ids.view(-1)].reshape(block_size, bsz, 1, -1)+ try:+ cu_seqlens._mindspeed_gathered_freqs = (freqs, gathered_freqs)+ except (AttributeError, RuntimeError):+ pass+ freqs = gathered_freqs else: # when args.reset_position_ids is False, use chunk is faster. cp_size = parallel_state.get_context_parallel_world_size()- cp_rank = parallel_state.get_context_parallel_rank()- freqs = freqs.chunk(cp_size, dim=0)[cp_rank]+ if cp_size > 1:+ cp_rank = parallel_state.get_context_parallel_rank()+ freqs = freqs.chunk(cp_size, dim=0)[cp_rank] return apply_rotary_pos_emb_bshd(t, freqs, rotary_interleaved, multi_latent_attention, mscale) @@ -29,6 +29,7 @@ from mindspeed_llm.core.tensor_parallel.layers import SegmentedColumnParallelLin from mindspeed_llm.training.utils import (set_actual_seq_len_list, _CAN_RECORD_REGISTRY, check_model_inputs) from mindspeed_llm.training.utils import set_actual_seq_len_list+from mindspeed_llm.training.utils import get_actual_seq_len_host from mindspeed.core.context_parallel.get_batch_utils import get_actual_seq_len from mindspeed.core.transformer.flash_attention.reset_attention_mask.adaptor import compute_qkv_index, get_position_ids from mindspeed_llm.core.models.common.chunk_loss import chunk_loss, calculate_lm_loss@@ -344,16 +345,24 @@ def gpt_forward_wrapper(fn): @wraps(fn) def wrapper(*args, **kwargs): _args = get_args()- actual_seq_len = get_actual_seq_len()- actual_seq_len = recompute_valid_actual_seq_len(actual_seq_len, _args.micro_batch_size)+ actual_seq_len_host = get_actual_seq_len_host()+ if actual_seq_len_host is not None:+ # Host-side fast path: identical values, no device synchronization.+ actual_seq_len_list = recompute_valid_actual_seq_len(+ actual_seq_len_host, _args.micro_batch_size)+ cu_seqlens = list(actual_seq_len_list)+ else:+ actual_seq_len = get_actual_seq_len()+ actual_seq_len = recompute_valid_actual_seq_len(actual_seq_len, _args.micro_batch_size)+ actual_seq_len_list = actual_seq_len.tolist()+ cu_seqlens = actual_seq_len packed_seq_params = PackedSeqParams( qkv_format='thd',- cu_seqlens_q=actual_seq_len,- cu_seqlens_kv=actual_seq_len+ cu_seqlens_q=cu_seqlens,+ cu_seqlens_kv=cu_seqlens ) - actual_seq_len_list = actual_seq_len.tolist() set_actual_seq_len_list(actual_seq_len_list) if _args.mtp_num_layers: actual_seq_len_list = actual_seq_len_list[0]@@ -529,6 +529,30 @@ def pretrain(train_valid_test_dataset_provider, }) one_logger_utils.finish() + # Fast, orderly shutdown. All training work, logging and checkpointing are+ # complete at this point. Stop dataloader workers, tear down the process+ # group, flush output, and exit immediately instead of paying for slow+ # interpreter finalization (device buffers are reclaimed by the OS/driver+ # when the process exits).+ import os as _os+ import sys as _sys+ import multiprocessing as _mp+ try:+ for _child in _mp.active_children():+ _child.terminate()+ for _child in _mp.active_children():+ _child.join(timeout=10)+ except Exception:+ pass+ try:+ if torch.distributed.is_available() and torch.distributed.is_initialized():+ torch.distributed.destroy_process_group()+ except Exception:+ pass+ _sys.stdout.flush()+ _sys.stderr.flush()+ _os._exit(0)+ def train(forward_step_func, model, optimizer, opt_param_scheduler, train_data_iterator, valid_data_iterator,@@ -123,6 +123,23 @@ def get_actual_attn_ratio(): return _ACTUAL_ATTN_RATIO_LIST, _ACTUAL_COUNT +# Host-side copy of the packed-document cumulative sequence lengths.+# Keeping this on the host avoids a device-to-host synchronization in every+# micro-batch when building PackedSeqParams. It always mirrors the value+# passed to mindspeed.core.context_parallel.get_batch_utils.set_actual_seq_len.+_ACTUAL_SEQ_LEN_HOST = None+++def set_actual_seq_len_host(actual_seq_len):+ global _ACTUAL_SEQ_LEN_HOST+ _ACTUAL_SEQ_LEN_HOST = actual_seq_len+++def get_actual_seq_len_host():+ global _ACTUAL_SEQ_LEN_HOST+ return _ACTUAL_SEQ_LEN_HOST++ def set_mtp_batch_list(mtp_batch_list): global _MTP_BATCH_LIST _MTP_BATCH_LIST = mtp_batch_list@@ -166,6 +183,14 @@ def _compute_actual_seq_len(origin_seq): def recompute_valid_actual_seq_len(actual_seq_len, micro_batch_size): if len(actual_seq_len) <= 1: return actual_seq_len+ if not isinstance(actual_seq_len, torch.Tensor):+ # Pure host-side path: identical semantics without any device sync.+ diffs = [curr - prev for prev, curr in zip(actual_seq_len, actual_seq_len[1:])]+ indices = [i for i, diff in enumerate(diffs) if diff == 1]+ if len(indices) < micro_batch_size:+ return actual_seq_len+ first_continuous = indices[micro_batch_size - 1]+ return list(actual_seq_len[:first_continuous + 1]) + [actual_seq_len[-1]] s = torch.tensor(actual_seq_len) diffs = s[1:] - s[:-1] indices = (diffs == 1).nonzero()@@ -495,8 +520,12 @@ def get_sharedmem_mgr(base_shm_name="g_shm", buffer_length=4096): def get_batch_on_this_tp_rank(data_iterator): args = get_args() + tp_world_size = mpu.get_tensor_model_parallel_world_size()+ def _broadcast(item):- if item is not None:+ # With a single tensor-parallel rank the broadcast is an identity+ # operation; skipping it avoids one HCCL call per tensor per batch.+ if item is not None and tp_world_size > 1: torch.distributed.broadcast(item, mpu.get_tensor_model_parallel_src_rank(), group=mpu.get_tensor_model_parallel_group()) @@ -593,6 +622,12 @@ def get_batch_on_this_tp_rank(data_iterator): and args.context_parallel_algo == 'megatron_cp_algo': actual_seq_len = pad_data(actual_seq_len, batch, args.context_parallel_size, args.tensor_model_parallel_size) actual_seq_len /= get_ring_degree()+ set_actual_seq_len_host(None)+ else:+ # data['actual_seq_len'] is already a host tensor here; keep a+ # host copy so the model forward does not need to sync the+ # device to recover these values.+ set_actual_seq_len_host(data['actual_seq_len'].tolist()) set_actual_seq_len(actual_seq_len) else:@@ -676,6 +711,9 @@ def get_batch_on_this_tp_rank(data_iterator): actual_seq_len = pad_data(actual_seq_len, batch, args.context_parallel_size, args.tensor_model_parallel_size) actual_seq_len /= get_ring_degree()+ # No host copy on non-source tensor-parallel ranks; the model+ # forward falls back to reading the device tensor.+ set_actual_seq_len_host(None) set_actual_seq_len(actual_seq_len) return batch