Kimi K3 · Serving

S05 · Mixed

Valid

Mixed interactivity 1dev · Implementation Optimization

1.00×PERFORMANCE RATIO
193TOOL EVENTS
1TEXT PATCHES
0BINARY NAMES

01 / PROCESS MAP

Tool activity

Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.

Main agentKimi K3 · 193 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
136Inspect
16Edit
1Build
8Validate
13Execute
19Other

02 / EVENT SEQUENCE

Event timeline

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.

Show event timelineHide event timeline126 groups · 193 calls

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>.

Main agent

  1. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    1 call · #0001–#0001

    echo <val>ls -l -a <val> <n> > <path>ls -l -a <path>head -n <n>
  2. Inspect · Task requirements

    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> <path>
  3. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0005–#0005

    Read <path>
  4. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0006–#0006

    Read <path>
  5. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    3 calls · #0007–#0009

    Read <path>
  6. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0010–#0012

    Read <path>
  7. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    2 calls · #0013–#0014

    Read <path>cd <path>head -c <n> <path>echoecho <flag>cat <path>
  8. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    5 calls · #0015–#0019

    cd <path>grep -n <val> <path>head -n <n>Read <path>
  9. Inspect · Benchmark & validation setup

    Requested source searches related to benchmark & validation setup.

    1 call · #0020–#0020

    Search <pattern> <path>
  10. Inspect · Task requirements

    Requested source searches related to task requirements.

    1 call · #0021–#0021

    Search <pattern> <path>
  11. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0022–#0024

    Read <path>
  12. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0025–#0025

    Read <path>
  13. Other · Source & workspace

    Requested environment setup or inspection and source searches related to source & workspace.

    1 call · #0026–#0026

    envgrep -E <val>sort
  14. Inspect · Source & workspace

    Requested file and log inspection and script or workload execution related to source & workspace.

    2 calls · #0027–#0028

    Read <path>cat <path> <n> > <path>python3 -m <module>head -n <n>
  15. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0029–#0029

    python3 -c <script> <n> >& <path>
  16. Inspect · Source & workspace

    Requested workspace inspection, source searches and file and log inspection related to source & workspace.

    1 call · #0030–#0030

    ls <path>grep -i -E <val>cat <path> <n> > <path>head -n <n>find <path> -maxdepth <n> -name <val> <n> > <path>
  17. Inspect · Latency & request handling

    Requested source searches and file and log inspection related to latency & request handling.

    1 call · #0031–#0031

    cd <path>grep -n <val> <path>head -n <n>
  18. Inspect · Benchmark & validation setup

    Requested file and log inspection and source searches related to benchmark & validation setup.

    2 calls · #0032–#0033

    cd <path>sed -n <val> <path>grep -n <val> <path>head -n <n>sed -n <path> <path>sed -n <val>
  19. Inspect · Source & workspace

    Requested task coordination, script or workload execution and file and log inspection related to source & workspace.

    3 calls · #0034–#0036

    Update task list <tasks>bash <script> <n> >& <path>tail -n <n>mkdir -p <path>cd <path>sed -n <val> <path>
  20. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0037–#0037

    bash <script> > <path> <n> >& <path>echo <val>
  21. Inspect · Batching & scheduling

    Requested workspace inspection, source searches and file and log inspection related to batching & scheduling.

    3 calls · #0038–#0040

    cd <path>ls <path>grep -n <val> <path>head -n <n>sed -n <val> <path>
  22. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0041–#0042

    cd <path>sed -n <val> <path>
  23. Validate · Benchmark & validation setup

    Requested file and log inspection and workspace inspection related to benchmark & validation setup.

    1 call · #0043–#0043

    tail -n <n> <path> <n> > <path>ls <path> <n> > <path>
  24. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    1 call · #0044–#0044

    Search <pattern> <path>
  25. Inspect · Benchmark & validation setup

    Requested source searches and file and log inspection related to benchmark & validation setup.

    1 call · #0045–#0045

    cd <path>grep -n <val> <path>grep -i <val>head
  26. Execute · Benchmark & validation setup

    Requested source searches and file and log inspection related to benchmark & validation setup.

    1 call · #0046–#0046

    cd <path>grep -n <val> <path> <path> <n> > <path>head
  27. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0047–#0047

    cd <path>sed -n <val> <path>
  28. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0048–#0048

    cd <path>grep -n <val> <path>head -n <n>grep -r -n <val> <path>
  29. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0049–#0049

    cd <path>sed -n <val> <path>
  30. Validate · Benchmark & validation setup

    Requested file and log inspection, script or workload execution and workspace file updates related to benchmark & validation setup.

    2 calls · #0050–#0051

    cat <path>echo <flag>python3 -c <script>cp <path> <path>echo <val>
  31. Execute · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0052–#0052

    bash <script> > <path> <n> >& <path>echo <val>
  32. Inspect · Source & workspace

    Requested task coordination and file and log inspection related to source & workspace.

    2 calls · #0053–#0054

    Update task list <tasks>cd <path>sed -n <val> <path>
  33. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    2 calls · #0055–#0056

    cd <path>grep -n <val> <path>head -n <n>sed -n <val> <path>
  34. Inspect · Attention kernels

    Requested source searches and file and log inspection related to attention kernels.

    1 call · #0057–#0057

    grep -i -E <val> <path>head -n <n>
  35. Inspect · Benchmark & validation setup

    Requested source searches and file and log inspection related to benchmark & validation setup.

    1 call · #0058–#0058

    grep -E <val> <path>head -n <n>tail -n <n>
  36. Inspect · Source & workspace

    Requested environment setup or inspection, file and log inspection and source searches related to source & workspace.

    1 call · #0059–#0059

    env <vars>tail -n <n> <val> <n> > <path>cut <flag>grep -c <val> <val> <n> > <path>
  37. Inspect · Attention kernels

    1 tool error

    Requested source searches, file and log inspection and workspace inspection related to attention kernels.

    3 calls · #0060–#0062

    cd <path>grep -r -n <val> <path> <n> > <path>headls <path>grep -i <val>head -n <n>
    4 more command sketches
    grep -i -E <val>grep -r -n <val> <path>grep -i -n <val>grep -r -l -n <val> <path>
  38. Inspect · Source & workspace

    Requested workspace inspection, file and log inspection and environment setup or inspection related to source & workspace.

    2 calls · #0063–#0064

    cd <path>ls <path> <n> > <path>sed -n <val> <path> <n> > <path>env <vars>ls <path>grep -c <val> <val>
    3 more command sketches
    grep <val> <val>tail -n <n>cut <flag>
  39. Other · Latency & request handling

    Requested script or workload execution related to latency & request handling.

    1 call · #0065–#0065

    python3 -c <script>
  40. Inspect · Source & workspace

    Requested script or workload execution and file and log inspection related to source & workspace.

    1 call · #0066–#0066

    python3 -c <script>head -n <n>
  41. Inspect · Batching & scheduling

    Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.

    1 call · #0067–#0067

    env <vars>grep -n <val> <path>awk <path> <val>grep -E <val>head -n <n>cut <flag>
  42. Inspect · Source & workspace

    Requested environment setup or inspection, file and log inspection and source searches related to source & workspace.

    1 call · #0068–#0068

    env <vars>awk <path> <val>grep -v -E <val>cut <flag>head -n <n>
  43. Inspect · Batching & scheduling

    Requested environment setup or inspection, source searches and file and log inspection related to batching & scheduling.

    1 call · #0069–#0069

    env <vars>grep -E <val> <val>awk <val>tail -n <n>echo <val>ls <path> <n> > <path>
  44. Execute · Benchmark & validation setup

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    1 call · #0070–#0070

    python3 -c <script>cp <path> <path>
  45. Inspect · Batching & scheduling

    Requested environment setup or inspection, file and log inspection and source searches related to batching & scheduling.

    2 calls · #0071–#0072

    env <vars>awk <path> <val>grep -v -E <val>cut <flag>head -n <n>
  46. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0073–#0073

    date -upython3 - <script>
  47. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    1 call · #0074–#0074

    cd <path>grep -r -n <val> <path>head -n <n>
  48. Inspect · Batching & scheduling

    Requested source searches, file and log inspection and workspace inspection related to batching & scheduling.

    2 calls · #0075–#0076

    cd <path>grep -r -n <val> <path>head -n <n>grep -r -n <val> <path> <n> > <path>headls <path> <n> > <path>
    1 more command sketches
    sed -n <val> <path>
  49. Execute · Prefix caching

    Requested environment setup or inspection related to prefix caching.

    1 call · #0077–#0077

    cd <path>env <vars> nohup <path> -m <val> <flag> <args>echo <val>
  50. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0078–#0078

    cd <path>grep -r -n <val> <path> <path> <path> <n> > <path>head
  51. Inspect · Source & workspace

    Requested workspace inspection, source searches and file and log inspection related to source & workspace.

    1 call · #0079–#0079

    cd <path>ls <path> <n> > <path>grep -r -n <val> <path> <n> > <path>head
  52. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0080–#0080

    cd <path>sed -n <val> <path>
  53. Inspect · Device memory

    Requested source searches and file and log inspection related to device memory.

    1 call · #0081–#0081

    cd <path>grep -r -n <val> <path> <path> <n> > <path>grep -r -n <val> <path> <n> > <path>head
  54. Inspect · Source & workspace

    Requested source searches, file and log inspection and script or workload execution related to source & workspace.

    5 calls · #0082–#0086

    cd <path>grep -r -n <val> <path>headgrep -r -n <val> <path> <n> > <path>head -n <n>sed -n <val> <path>
    5 more command sketches
    python3 - <script>grep -r -l -n <val> <path>python3 -c <script> <n> >& <path>tail -n <n>Update task list <tasks>
  55. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0087–#0087

    tail -n <n> <path>cut <flag>
  56. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0088–#0088

    Write <path>
  57. Other · Source & workspace

    Requested script or workload execution and source searches related to source & workspace.

    2 calls · #0089–#0090

    cd <path>python3 <script> <val> <n> >& <path>grep -v <val>
  58. Execute · Batching & scheduling

    Requested script or workload execution, source searches and file and log inspection related to batching & scheduling.

    1 call · #0091–#0091

    cd <path>python3 <script> <val> <n> >& <path>grep -v <val>grep -E <val> <path>tail -n <n>cut <flag>
  59. Inspect · Source & workspace

    Requested environment setup or inspection and file and log inspection related to source & workspace.

    1 call · #0092–#0092

    env <vars>awk <path> <val>cut <flag>head -n <n>
  60. Other · Source & workspace

    Requested script or workload execution and source searches related to source & workspace.

    2 calls · #0093–#0094

    python3 -m <module> <path>grep -c <path> <path>cd <path>python3 <script> <val> <n> >& <path>grep -v <val>
  61. Execute · Runtime processes

    Requested environment setup or inspection, script or workload execution and source searches related to runtime processes.

    1 call · #0095–#0095

    env <vars>python3 - <script>grep <val> <val>head -n <n>cut <flag>
  62. Inspect · Source & workspace

    1 tool error

    Requested workspace inspection, file and log inspection and environment setup or inspection related to source & workspace.

    3 calls · #0096–#0098

    find <path> -maxdepth <n> -type <val> <n> > <path>head -n <n>du <flag> <args>headls -l -a <path> <n> > <path>ls <path> <n> > <path>
    7 more command sketches
    ls -l -a <path> <path> <n> > <path>envgrep -i -E <val>find <path> -maxdepth <n> -name <val> -o -maxdepth <n> -name <val> -type <val> <args>grep -v <val>find <path> -maxdepth <n> <flag> <args>find <path> -maxdepth <n>
  63. Inspect · Attention kernels

    Requested workspace inspection, source searches and file and log inspection related to attention kernels.

    3 calls · #0099–#0101

    cd <path>ls <path>grep -r -n <val> <path>head -n <n>sed -n <val> <path>
  64. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0102–#0102

    cd <path>grep -r -n <val> <path>head -n <n>
  65. Execute · Source & workspace

    Requested service requests, script or workload execution and source searches related to source & workspace.

    1 call · #0103–#0103

    cd <path>curl -s -X <val> <url> -H <path> -d <path>echopython3 <script> <val> <n> >& <path>grep -v <val>head -n <n>
    3 more command sketches
    sleep <n>curl -s -X <val> <url> <val> -la <path> <n> > <path>head
  66. Inspect · Source & workspace

    Requested environment setup or inspection, workspace inspection and file and log inspection related to source & workspace.

    9 calls · #0104–#0112

    env <vars>find <val> -name <val>headdu <flag> <args>python3 - <script>
  67. Inspect · Attention kernels

    Requested script or workload execution related to attention kernels.

    1 call · #0113–#0113

    python3 - <script>
  68. Inspect · Device memory

    Requested source searches and file and log inspection related to device memory.

    2 calls · #0114–#0115

    cd <path>grep -r -n <val> <path> <n> > <path>headgrep -r -l -n <val> <path>head -n <n>sed -n <val> <path>
  69. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0116–#0116

    python3 - <script>
  70. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    2 calls · #0117–#0118

    cd <path>sed -n <val> <path>
  71. Inspect · Runtime processes

    Requested source searches and file and log inspection related to runtime processes.

    3 calls · #0119–#0121

    cd <path>grep -r -n <val> <path>headsed -n <val> <path>
  72. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    1 call · #0122–#0122

    cd <path>grep -n <val> <path>head -n <n>
  73. Edit · Attention kernels

    1 tool error

    Requested code edits related to attention kernels.

    1 call · #0123–#0123

    Edit <path>
  74. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0124–#0124

    Read <path>
  75. Edit · Attention kernels

    Requested code edits related to attention kernels.

    2 calls · #0125–#0126

    Edit <path>
  76. Inspect · Runtime processes

    1 tool error

    Requested file and log inspection and source searches related to runtime processes.

    4 calls · #0127–#0130

    cd <path>sed -n <val> <path>Read <path>grep -n <val> <path>head -n <n>
  77. Edit · Runtime processes

    Requested code edits related to runtime processes.

    3 calls · #0131–#0133

    Edit <path>
  78. Inspect · Source & workspace

    1 tool error

    Requested source searches and file and log inspection related to source & workspace.

    1 call · #0134–#0134

    cd <path>grep -r -n <val> <path>sed -n <path> <path> <n> > <path>grep -r -n <flag> <args>
  79. Inspect · Attention kernels

    Requested source searches, file and log inspection and script or workload execution related to attention kernels.

    1 call · #0135–#0135

    cd <path>grep -n <val> <path>head -n <n>python3 -c <script>
  80. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0136–#0136

    cd <path>sed -n <val> <path>tr <val> <val>
  81. Inspect · Batching & scheduling

    Requested file and log inspection and source searches related to batching & scheduling.

    1 call · #0137–#0137

    cd <path>sed -n <val> <path> <n> > <path>grep -r -n <val> <path> <path>
  82. Inspect · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0138–#0138

    Update task list <tasks>
  83. Other · Source & workspace

    Requested process termination, execution waits and runtime inspection related to source & workspace.

    1 call · #0139–#0139

    kill <n> <n> > <path>sleep <n>kill <flag> <args>ps <val>grep -E <val>grep -v <val>
    3 more command sketches
    awk <val>xargs -r <val> <flag> <args>echo <val>
  84. Other · Prefix caching

    Requested environment setup or inspection related to prefix caching.

    1 call · #0140–#0140

    cd <path>env <vars> nohup <path> -m <val> <flag> <args>echo <val>
  85. Other · Runtime processes

    Requested source searches related to runtime processes.

    1 call · #0141–#0141

    <command> <args>grep -E <val> <path>cut <flag>
  86. Inspect · Source & workspace

    Requested script or workload execution, source searches and file and log inspection related to source & workspace.

    2 calls · #0142–#0143

    cd <path>python3 <script> <val> <n> >& <path>grep -v <val>tail -n <n>grep -r -n <val> <path>head
    3 more command sketches
    grep -r -n <val> <path> <n> > <path>head -n <n>ls <path> <n> > <path>
  87. Build · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0144–#0144

    cd <path>python3 - <script>
  88. Inspect · Batching & scheduling

    Requested file and log inspection and source searches related to batching & scheduling.

    3 calls · #0145–#0147

    cd <path>sed -n <path> <path>grep -r -n <val> <path>head -n <n>grep -v <path>
  89. Inspect · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0148–#0148

    python3 - <script>
  90. Other · Runtime processes

    Requested process termination, execution waits and runtime inspection related to runtime processes.

    1 call · #0149–#0149

    kill <n> <n> > <path>sleep <n>ps <val>grep -E <val>grep -v <val>awk <val>
    3 more command sketches
    xargs -r <val> <flag> <args>grep -c <val>echo <val>
  91. Inspect · Runtime processes

    1 tool error

    Requested runtime inspection, source searches and file and log inspection related to runtime processes.

    1 call · #0150–#0150

    ps <val>grep <val>head -n <n>pkill <flag> <args>sleep <n>wc -l
  92. Inspect · Device memory

    Requested runtime inspection, source searches and file and log inspection related to device memory.

    1 call · #0151–#0151

    ps <val>grep -E <val>awk <val>xargs -r <val> <flag> <args>sleep <n>wc -l
    3 more command sketches
    npu-smi info <n> > <path>head -n <n>true
  93. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0152–#0152

    bash <script> > <path> <n> >& <path>echo <val>
  94. Inspect · Batching & scheduling

    Requested source searches and file and log inspection related to batching & scheduling.

    1 call · #0153–#0153

    grep -E <val> <path>head -n <n>cut <flag>
  95. Other · Source & workspace

    Requested execution waits related to source & workspace.

    1 call · #0154–#0154

    Wait for <task>
  96. Validate · Benchmark & validation setup

    Requested script or workload execution and source searches related to benchmark & validation setup.

    1 call · #0155–#0155

    python3 -c <script>grep -E <val> <path>cut <flag>
  97. Inspect · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0156–#0156

    Update task list <tasks>
  98. Execute · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0157–#0157

    bash <script> > <path> <n> >& <path>echo <val>
  99. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0158–#0158

    Write <path>
  100. Inspect · Source & workspace

    Requested repository inspection, execution waits and workspace inspection related to source & workspace.

    2 calls · #0159–#0160

    cd <path>git status --shortgit diff --statsleep <n>ls <path> <n> > <path>wc -l
    2 more command sketches
    tail -n <n> <path> <n> > <path>cut <flag>
  101. Execute · Benchmark & validation setup

    Requested file and log inspection, workspace inspection and script or workload execution related to benchmark & validation setup.

    1 call · #0161–#0161

    cat <path>ls -l -a <path> <n> > <path>python3 <script>
  102. Inspect · Source & workspace

    Requested environment setup or inspection, source searches and file and log inspection related to source & workspace.

    1 call · #0162–#0162

    env <vars>grep -E <path> <val>head -n <n>cut <flag>echo <flag>
  103. Inspect · Runtime processes

    Requested source searches and file and log inspection related to runtime processes.

    2 calls · #0163–#0164

    cd <path>grep -n <path> <path>head -n <n>Read <path>
  104. Edit · Runtime processes

    Requested code edits related to runtime processes.

    2 calls · #0165–#0166

    Edit <path>
  105. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0167–#0167

    Read <path>
  106. Edit · Runtime processes

    1 tool error

    Requested code edits related to runtime processes.

    4 calls · #0168–#0171

    Edit <path>
  107. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0172–#0172

    Read <path>
  108. Edit · Runtime processes

    1 tool error

    Requested code edits related to runtime processes.

    1 call · #0173–#0173

    Edit <path>
  109. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0174–#0174

    Read <path>
  110. Edit · Runtime processes

    Requested code edits related to runtime processes.

    1 call · #0175–#0175

    Edit <path>
  111. Other · Runtime processes

    Requested script or workload execution and source searches related to runtime processes.

    1 call · #0176–#0176

    cd <path>python3 -c <script>grep -n <val> <path>
  112. Other · Prefix caching

    Requested environment setup or inspection related to prefix caching.

    1 call · #0177–#0177

    cd <path>env <vars> nohup <path> -m <val> <flag> <args>echo <val>
  113. Inspect · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0178–#0178

    Update task list <tasks>
  114. Execute · Runtime processes

    Requested source searches and execution waits related to runtime processes.

    1 call · #0179–#0179

    <command> <args>cut <flag>grep -q <path>sleep <n>grep -E <val> <path>
  115. Other · Runtime processes

    Requested process termination, execution waits and runtime inspection related to runtime processes.

    1 call · #0180–#0180

    kill <n> <n> > <path>sleep <n>ps <val>grep -E <val>awk <val>xargs -r <val> <flag> <args>
    1 more command sketches
    wc -l
  116. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0181–#0181

    bash <script> > <path> <n> >& <path>echo <val>
  117. Other · Source & workspace

    Requested execution waits related to source & workspace.

    1 call · #0182–#0182

    Wait for <task>
  118. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0183–#0183

    python3 -c <script>date -u
  119. Execute · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0184–#0184

    bash <script> > <path> <n> >& <path>echo <val>
  120. Inspect · Source & workspace

    Requested repository inspection, workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0185–#0186

    cd <path>git diffls <path> <n> > <path>wc -ltail -n <n> <path>cut <flag>
  121. Other · Source & workspace

    Requested execution waits related to source & workspace.

    1 call · #0187–#0187

    Wait for <task>
  122. Inspect · Source & workspace

    Requested script or workload execution, file and log inspection and task coordination related to source & workspace.

    2 calls · #0188–#0189

    python3 <script> <n> >& <path>head -n <n>Update task list <tasks>
  123. Execute · Source & workspace

    Requested script or workload execution, file and log inspection and runtime inspection related to source & workspace.

    1 call · #0190–#0190

    bash <script> <n> >& <path>tail -n <n>ps <val>grep -E <val>wc -l<command> <args>
    4 more command sketches
    echo <val>head -c <n>echols <path> <n> > <path>
  124. Inspect · Source & workspace

    Requested repository inspection, workspace file updates and workspace inspection related to source & workspace.

    1 call · #0191–#0191

    cd <path>git status --shortgit <val> <val>rm -rf <path>du <flag> <args>ls <path>
  125. Execute · Latency & request handling

    Requested runtime inspection, source searches and file and log inspection related to latency & request handling.

    1 call · #0192–#0192

    ps <val>grep -E <val>head -n <n>echo <flag>python3 -c <script>
  126. Inspect · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0193–#0193

    Update task list <tasks>

03 / CANDIDATE ARTIFACT

Text patches & binary names

Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.

sglang · 2 changed files

Base commit: 340db9201005fc64635bb25db1d2538f955761c3

diff --git a/python/sglang/srt/entrypoints/http_server.py b/python/sglang/srt/entrypoints/http_server.pyindex ac38b4668c8119dbd1a17c9eabff4e5fb0430faa..8461de6bcb4cb00041a7a007f8123e0632943b68 100644--- a/python/sglang/srt/entrypoints/http_server.py+++ b/python/sglang/srt/entrypoints/http_server.py@@ -171,6 +171,7 @@ from sglang.srt.utils import (     delete_directory,     get_bool_env_var,     is_mps,+    is_npu,     kill_process_tree,     set_uvicorn_logging_configs, )@@ -1826,15 +1827,19 @@ async def available_models():     served_model_names = [_global_state.tokenizer_manager.served_model_name]     model_cards = [] -    # Add base model-    for served_model_name in served_model_names:-        model_cards.append(-            ModelCard(-                id=served_model_name,-                root=served_model_name,-                max_model_len=_global_state.tokenizer_manager.model_config.context_len,+    # While NPU startup compile priming is still running, report no models so+    # readiness probes keep waiting and no external traffic can overlap the+    # priming requests.+    if not _NPU_COMPILE_PRIMING_PENDING:+        # Add base model+        for served_model_name in served_model_names:+            model_cards.append(+                ModelCard(+                    id=served_model_name,+                    root=served_model_name,+                    max_model_len=_global_state.tokenizer_manager.model_config.context_len,+                )             )-        )      # Add loaded LoRA adapters     if _global_state.tokenizer_manager.server_args.enable_lora:@@ -2158,6 +2163,108 @@ async def _send_disaggregation_warmup_requests(         )  +# Starts as "pending" so that readiness probes hitting /v1/models cannot latch+# before the startup warmup (including NPU compile priming) has completed.+# Cleared once warmup finishes (or is skipped) in _wait_and_warmup.+_NPU_COMPILE_PRIMING_PENDING = True+++def _priming_input_ids(length: int, seed: int) -> List[int]:+    """Deterministic in-vocabulary token ids for startup compile priming.++    Fixed pseudo-random ids (never fixture-derived): the only purpose is to+    drive real model forwards over the shapes production traffic will use.+    """+    ids = []+    x = seed+    for _ in range(length):+        x = (1103515245 * x + 12345) % (2**31)+        ids.append(100 + x % 50000)+    return ids+++def _execute_npu_compile_priming(+    server_args: ServerArgs,+    url: str,+    headers: Dict[str, str],+    ssl_verify: Union[bool, str],+) -> None:+    """Prime one-time device kernel compilations before reporting readiness.++    Eager (non-graphed) forwards on Ascend compile operator kernels the first+    time each shape family is seen, which otherwise surfaces as multi-second+    stalls inside live traffic. Running a small, fixed set of real generate+    requests at startup moves that cost into the warmup window. Best effort:+    priming failures are logged and never fail the launch.+    """+    import concurrent.futures++    global _NPU_COMPILE_PRIMING_PENDING+    _NPU_COMPILE_PRIMING_PENDING = True+    timeout = envs.SGLANG_WARMUP_TIMEOUT.get()+    timeout = timeout if timeout > 0 else 600+    started = time.monotonic()++    def fire(payload: Dict[str, Any]) -> int:+        res = requests.post(+            url + "/generate",+            json=payload,+            headers=headers,+            timeout=timeout,+            verify=ssl_verify,+        )+        return res.status_code++    def short_req(seed: int, out_len: int = 8) -> Dict[str, Any]:+        return {+            "input_ids": _priming_input_ids(512, seed),+            "sampling_params": {+                "temperature": 0.0,+                "max_new_tokens": out_len,+                "ignore_eos": True,+            },+        }++    executor = concurrent.futures.ThreadPoolExecutor(max_workers=12)+    try:+        # Phase A: a burst of short requests (batched prefill + steady decode).+        futures = [executor.submit(fire, short_req(17 + i)) for i in range(8)]+        # Phase B: one long chunked-prefill request admitted while short+        # requests are decoding (mixed extend+decode shapes at full occupancy).+        delayed_long = executor.submit(+            lambda: (time.sleep(0.25), fire(+                {+                    "input_ids": _priming_input_ids(16384, 999983),+                    "sampling_params": {+                        "temperature": 0.0,+                        "max_new_tokens": 8,+                        "ignore_eos": True,+                    },+                }+            ))[1]+        )+        futures.append(delayed_long)+        # Phase C: a second short burst (post-chunk admission shapes).+        futures += [executor.submit(fire, short_req(1000 + i)) for i in range(8)]+        failures = [f.result() for f in futures if f.result() != 200]+        if failures:+            logger.warning(+                "NPU startup compile priming saw non-200 responses: %s", failures+            )+        logger.info(+            "NPU startup compile priming finished in %.1f s",+            time.monotonic() - started,+        )+    except Exception:+        logger.warning(+            "NPU startup compile priming failed (continuing launch): %s",+            get_exception_traceback(),+        )+    finally:+        executor.shutdown(wait=True)+        _NPU_COMPILE_PRIMING_PENDING = False++ def _execute_server_warmup(server_args: ServerArgs):     headers = {}     url = server_args.url()@@ -2282,6 +2389,10 @@ def _execute_server_warmup(server_args: ServerArgs):                 verify=ssl_verify,             )             assert res.status_code == 200, f"{res.text}"+            if is_npu() and get_bool_env_var(+                "SGLANG_NPU_STARTUP_COMPILE_PRIMING", default="true"+            ):+                _execute_npu_compile_priming(server_args, url, headers, ssl_verify)             # Skip server_status update for Rust server             if not envs.SGLANG_RUST_SERVER.get():                 _global_state.tokenizer_manager.server_status = ServerStatus.Up@@ -2351,6 +2462,11 @@ def _wait_and_warmup(     else:         _global_state.tokenizer_manager.server_status = ServerStatus.Up +    # Warmup (including any compile priming) is done: allow readiness probes+    # to see the served model from here on.+    global _NPU_COMPILE_PRIMING_PENDING+    _NPU_COMPILE_PRIMING_PENDING = False+     # The server is ready for requests     logger.info("The server is fired up and ready to roll!") diff --git a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.pyindex 89e9de06db1cb0350cb55b83dbaffc15c100fff9..736e8c54d0648274454a521a1455d584d1454234 100644--- a/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py+++ b/python/sglang/srt/hardware_backend/npu/attention/ascend_backend.py@@ -430,7 +430,14 @@ class AscendAttnBackend(AttentionBackend):     def init_forward_metadata(self, forward_batch: ForwardBatch):         """Init the metadata for a forward pass."""         self.forward_metadata = ForwardMetadata()-        seq_lens_max = forward_batch.seq_lens.max()+        # Compute the max sequence length on the host whenever the CPU copy is+        # available. Using the device scalar as a slice bound forces a+        # device-to-host sync in the middle of batch preparation, which stalls+        # the kernel-launch pipeline of every eager forward.+        if forward_batch.seq_lens_cpu is not None:+            seq_lens_max = int(forward_batch.seq_lens_cpu.max().item())+        else:+            seq_lens_max = int(forward_batch.seq_lens.max().item())         if forward_batch.forward_mode.is_target_verify():             seq_lens_max += self.speculative_num_draft_tokens         elif (@@ -459,9 +466,16 @@ class AscendAttnBackend(AttentionBackend):             )         if forward_batch.extend_seq_lens is not None:             self.forward_metadata.extend_seq_lens = forward_batch.extend_seq_lens-            self.forward_metadata.extend_seq_lens_cpu_int = (-                forward_batch.extend_seq_lens.cpu().int()-            )+            if forward_batch.extend_seq_lens_cpu is not None:+                # Build the CPU int32 copy from the host-side lengths instead of+                # a device->host round trip on every eager batch.+                self.forward_metadata.extend_seq_lens_cpu_int = torch.tensor(+                    forward_batch.extend_seq_lens_cpu, dtype=torch.int32+                )+            else:+                self.forward_metadata.extend_seq_lens_cpu_int = (+                    forward_batch.extend_seq_lens.cpu().int()+                )         if forward_batch.seq_lens is not None:             self.forward_metadata.seq_lens = forward_batch.seq_lens.int()         else: