GPT-6 Astra · Serving

S09 · Generalist

Valid

Generalist 6-regime 1dev · Implementation Optimization

1.03×PERFORMANCE RATIO
258TOOL 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 agentGPT-6 Astra · 258 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
120Inspect
7Edit
6Build
53Validate
50Execute
1Rollback
21Other

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 timeline205 groups · 258 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 · Task requirements

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

    2 calls · #0001–#0002

    cat <path> <path>pwdrg --files -g <val> -g <path> -g <path> -g <path> -g <path> <args>
  2. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0003–#0003

    git status --short
  3. Inspect · Task requirements

    Requested file and log inspection and source searches related to task requirements.

    2 calls · #0004–#0005

    cat <path> <path> <path> <path>printf <val> <val> <val><command> <args>rg --files <path> <path> <path> <path> -g <path> -g <path> -g <val> <args>
  4. Inspect · Benchmark & validation setup

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

    1 call · #0006–#0006

    cat <path>
  5. Inspect · Task requirements

    Requested source searches and file and log inspection related to task requirements.

    1 call · #0007–#0007

    rg --files <path> <val> -g <val> -g <val> -g <val> -g <val> <args>head -n <n>
  6. Inspect · Benchmark & validation setup

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

    1 call · #0008–#0008

    sed -n <val> <path>rg -n <val> <path> <path>
  7. Inspect · Latency & request handling

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

    1 call · #0009–#0009

    cat <path>
  8. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0010–#0010

    sed -n <val> <path>
  9. Other · Source & workspace

    1 tool error

    Requested script or workload execution related to source & workspace.

    1 call · #0011–#0011

    bash <script>
  10. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0012–#0012

    sed -n <val> <path>
  11. Inspect · Benchmark & validation setup

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

    1 call · #0013–#0013

    rg -n <val> <path> <path>head -n <n>sed -n <val> <path>
  12. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0014–#0014

    cat <path>printf <val> <val> <val> <val> <val>command -v <val>
  13. Inspect · Benchmark & validation setup

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

    1 call · #0015–#0015

    rg -n <val> <path>tail -n <n>sed -n <val> <path>cat <val>
  14. Inspect · Attention kernels

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

    1 call · #0016–#0016

    sed -n <val> <path>rg -n <val> <path>
  15. Other · Source & workspace

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

    1 call · #0017–#0017

    env <vars> bash <script> > <path> <n> >& <path>cat <path>
  16. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0018–#0018

    sed -n <val> <path>
  17. Inspect · Benchmark & validation setup

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

    1 call · #0019–#0019

    printf <val> <val>rg --files <path>head -n <n>tail -n <n> <path>sed -n <val> <path>
  18. Inspect · Attention kernels

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

    1 call · #0020–#0020

    rg -n <val> <path> <path> <path>sed -n <val> <path>
  19. Inspect · Batching & scheduling

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

    1 call · #0021–#0021

    ps <flag> <args>rg <val>tail -n <n> <path>sed -n <val> <path>
  20. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0022–#0022

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

    1 tool error

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

    1 call · #0023–#0023

    bash <script> > <path> <n> >& <path>
  22. Other · Source & workspace

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

    1 call · #0024–#0024

    kill <flag> <args>bash <script> > <path> <n> >& <path>cat <path>
  23. Inspect · Benchmark & validation setup

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

    1 call · #0025–#0025

    sed -n <val> <path>rg -n <val> <path>head -n <n>
  24. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0026–#0026

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

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

    1 call · #0027–#0027

    sed -n <val> <path>rg -n <val> <path> <path> <path> <path> <path>
  26. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0028–#0028

    sed -n <val> <path>
  27. Inspect · Speculative decoding

    Requested file and log inspection and source searches related to speculative decoding.

    1 call · #0029–#0029

    sed -n <val> <path>rg -n <val> <path> <path> -g <path>head -n <n>
  28. Inspect · Latency & request handling

    1 tool error

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

    1 call · #0030–#0030

    tail -n <n> <path>rg -n <val> <path>rg --files <path> -g <val>
  29. Inspect · Benchmark & validation setup

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

    1 call · #0031–#0031

    tail -n <n> <path>ps -C <val> -C <val> -o <val>head -n <n>cat <path>
  30. Inspect · Speculative decoding

    Requested file and log inspection related to speculative decoding.

    1 call · #0032–#0032

    sed -n <val> <path>
  31. Validate · Task requirements

    1 tool error

    Requested workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0033–#0033

    mkdir -p <path>env <vars> bash <script> > <path> <n> >& <path>
  32. Validate · Benchmark & validation setup

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

    1 call · #0034–#0034

    cat > <path> <script>
  33. Other · Source & workspace

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

    1 call · #0035–#0035

    kill <flag> <args>env <vars> bash <script> > <path> <n> >& <path>cat <path>
  34. Inspect · Source & workspace

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

    1 call · #0036–#0036

    sed -n <val> <path>rg --files <path> -g <val> -g <val> -g <val>head -n <n>rg -n <val> <val> -g <path>
  35. Inspect · Attention kernels

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

    1 call · #0037–#0037

    rg --files <val> -g <val> -g <val> -g <val> -g <val>head -n <n>sed -n <val> <path>
  36. Inspect · Benchmark & validation setup

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

    1 call · #0038–#0038

    tail -n <n> <path>rg --files <path> -g <val> -g <val> -g <val>head -n <n>rg -n <val> <path> <path> -g <path>
  37. Inspect · Source & workspace

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

    1 call · #0039–#0039

    sed -n <val> <path>rg -n <val> <path> -g <path>head -n <n>
  38. Inspect · Benchmark & validation setup

    1 tool error

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

    1 call · #0040–#0040

    sed -n <val> <path>rg -n <val> <path>
  39. Inspect · Attention kernels

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

    2 calls · #0041–#0042

    tail -n <n> <path>rg -n <val> <path>head -n <n>rg --files <path> -g <val> -g <val>sed -n <val> <path>cat <path>
  40. Inspect · Benchmark & validation setup

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

    1 call · #0043–#0043

    tail -n <n> <path>cat <path>
  41. Inspect · Attention kernels

    1 tool error

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

    2 calls · #0044–#0045

    rg -n <val> <path> <path>sed -n <val> <path>rg -n <val> <path> <path> -g <path>printf <val> <val>
  42. Validate · Benchmark & validation setup

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

    1 call · #0046–#0046

    python3 - <script>
  43. Inspect · Attention kernels

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

    1 call · #0047–#0047

    cat <path>sed -n <val> <path>rg -n <val> <path> -g <path>head -n <n>
  44. Inspect · Speculative decoding

    Requested source searches and file and log inspection related to speculative decoding.

    1 call · #0048–#0048

    rg --files <path> -g <val> -g <val> -g <val>tail -n <n>sed -n <val> <path>
  45. Inspect · Source & workspace

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

    1 call · #0049–#0049

    rg -n <val> <path>head -n <n>sed -n <val> <path>
  46. Validate · Benchmark & validation setup

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

    2 calls · #0050–#0051

    python3 - <script>
  47. Validate · Task requirements

    1 tool error

    Requested workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0052–#0052

    mkdir -p <path>env <vars> bash <script> > <path> <n> >& <path>
  48. Validate · Benchmark & validation setup

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

    1 call · #0053–#0053

    python3 - <script>
  49. Inspect · Source & workspace

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

    1 call · #0054–#0054

    sed -n <val> <path>rg -n <val> <path> -g <path>head -n <n>rg -n <val> <path>
  50. Validate · Benchmark & validation setup

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

    1 call · #0055–#0055

    python3 - <script>
  51. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0056–#0056

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

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

    2 calls · #0057–#0058

    python3 - <script>
  53. Inspect · Source & workspace

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

    1 call · #0059–#0059

    rg --files <path> -g <val> -g <val> -g <val> -g <val>head -n <n>sed -n <val> <path>
  54. Inspect · Attention kernels

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

    1 call · #0060–#0060

    rg -n <val> <path> <path>sed -n <val> <path>sha256sum <path> <path>
  55. Validate · Benchmark & validation setup

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

    3 calls · #0061–#0063

    python3 - <script>
  56. Validate · Task requirements

    1 tool error

    Requested script or workload execution, workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0064–#0064

    <command> <args>python3 - <script>mkdir -p <path>env <vars> bash <script> > <path> <n> >& <path>
  57. Validate · Benchmark & validation setup

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

    1 call · #0065–#0065

    python3 - <script>
  58. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0066–#0066

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

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

    1 call · #0067–#0067

    python3 - <script>
  60. Validate · Task requirements

    1 tool error

    Requested script or workload execution, workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0068–#0068

    <command> <args>python3 - <script>mkdir -p <path>env <vars> bash <script> > <path> <n> >& <path>
  61. Validate · Benchmark & validation setup

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

    5 calls · #0069–#0073

    python3 - <script>
  62. Other · Task requirements

    Requested workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0074–#0074

    mkdir -p <path>env <vars> python3 <script> <val> > <path> <n> >& <path>
  63. Validate · Benchmark & validation setup

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

    1 call · #0075–#0075

    python3 - <script>
  64. Edit · Attention kernels

    Requested code edits related to attention kernels.

    2 calls · #0076–#0077

    Apply patch <patch>
  65. Other · Attention kernels

    Requested script or workload execution and repository inspection related to attention kernels.

    1 call · #0078–#0078

    python3 - <script>git diff --statgit status --short
  66. Execute · Benchmark & validation setup

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

    1 call · #0079–#0079

    python3 - <script>
  67. Inspect · Source & workspace

    1 tool error

    Requested file and log inspection related to source & workspace.

    1 call · #0080–#0080

    cat <path>sed -n <val> <path>command -v <val>
  68. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0081–#0081

    sed -n <val> <path>
  69. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0082–#0082

    Apply patch <patch>
  70. Validate · Attention kernels

    Requested source searches and script or workload execution related to attention kernels.

    1 call · #0083–#0083

    rg -n <val> <path>python3 - <script>
  71. Inspect · Attention kernels

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

    1 call · #0084–#0084

    rg -n <val> <path> -g <path>head -n <n>sed -n <val> <path>
  72. Execute · Benchmark & validation setup

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

    1 call · #0085–#0085

    python3 - <script>
  73. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0086–#0086

    Apply patch <patch>
  74. Execute · Latency & request handling

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

    1 call · #0087–#0087

    python3 - <script>
  75. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0088–#0088

    sed -n <val> <path>
  76. Execute · Latency & request handling

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

    2 calls · #0089–#0090

    python3 - <script>
  77. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0091–#0091

    cat > <path> <script>
  78. Execute · Latency & request handling

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

    1 call · #0092–#0092

    python3 - <script>
  79. Execute · Benchmark & validation setup

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

    1 call · #0093–#0093

    python3 - <script>
  80. Validate · Latency & request handling

    Requested script or workload execution, workspace file updates and environment setup or inspection related to latency & request handling.

    1 call · #0094–#0094

    <command> <args>python3 - <script>mkdir -p <path>env <vars> bash <script> <flag> <args>
  81. Validate · Attention kernels

    1 tool error

    Requested script or workload execution, workspace file updates and environment setup or inspection related to attention kernels.

    1 call · #0095–#0095

    <command> <args>python3 - <script>mkdir -p <path>env <vars> python3 -m <module> -x -q -p <val> <script> > <path> <args>
  82. Execute · Latency & request handling

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

    1 call · #0096–#0096

    python3 - <script>
  83. Inspect · Source & workspace

    1 tool error

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

    1 call · #0097–#0097

    head -n <n> <path>ls -l <path>
  84. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0098–#0098

    Apply patch <patch>
  85. Build · Source & workspace

    1 tool error

    Requested script or workload execution related to source & workspace.

    1 call · #0099–#0099

    bash <script> > <path> <n> >& <path>
  86. Inspect · Source & workspace

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

    2 calls · #0100–#0101

    cat <path>rg -n <val> <path>tail -n <n>sed -n <val> <path>
  87. Inspect · Attention kernels

    Requested repository inspection and script or workload execution related to attention kernels.

    1 call · #0102–#0102

    git diff --checkpython3 - <script>
  88. Build · Runtime processes

    1 tool error

    Requested script or workload execution related to runtime processes.

    1 call · #0103–#0103

    python3 - <script>
  89. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0104–#0104

    tail -n <n> <path>head -n <n> <path>
  90. Validate · Speculative decoding

    Requested environment setup or inspection related to speculative decoding.

    1 call · #0105–#0105

    env <vars> python3 -m <module> -x -q -p <val> <script> <script> > <path> <args>
  91. Inspect · Attention kernels

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

    1 call · #0106–#0106

    head -n <n> <path>sed -n <val> <path>rg --files <path> -g <val> -g <val> -g <path>
  92. Inspect · Runtime processes

    1 tool error

    Requested source searches related to runtime processes.

    1 call · #0107–#0107

    printf <val> <val> <val> <val> <val>rg -l -F <flag> <args>
  93. Build · Source & workspace

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

    1 call · #0108–#0108

    tail -n <n> <path>env <vars> python3 -c <script> > <path> <n> > <path>
  94. Validate · Benchmark & validation setup

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

    1 call · #0109–#0109

    python3 - <script>cat <path>tail -n <n> <path>
  95. Inspect · Source & workspace

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

    3 calls · #0110–#0112

    head -n <n> <path>tail -n <n> <path><command> <args>rg <val>head -n <n>rg -n <val> <path> -g <path> -g <val> -g <path> -g <val>
    4 more command sketches
    printf <val> <val> <val>rg <flag> <args>ps -C <val> -o <val>tail -n <n>
  96. Validate · Attention kernels

    1 tool error

    Requested environment setup or inspection related to attention kernels.

    1 call · #0113–#0113

    env <vars> python3 -m <module> -x -q -p <val> <flag> <args>
  97. Build · Runtime processes

    Requested workspace file updates and environment setup or inspection related to runtime processes.

    1 call · #0114–#0114

    mkdir -p <path>env <vars> python3 -c <script> > <path> <n> > <path>
  98. Inspect · Source & workspace

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

    1 call · #0115–#0115

    python3 - <script><command> <args>rg <val>sort -utail -n <n>cat <path>
    1 more command sketches
    tail -n <n> <path>
  99. Inspect · Runtime processes

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

    1 call · #0116–#0116

    <command> <args>rg <val>head -n <n>rg <flag> <args>
  100. Build · Runtime processes

    Requested workspace file updates and environment setup or inspection related to runtime processes.

    1 call · #0117–#0117

    mkdir -p <path>env <vars> python3 -c <script> > <path> <n> > <path>
  101. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0118–#0118

    tail -n <n> <path>cat <path>head -n <n>
  102. Validate · Attention kernels

    1 tool error

    Requested environment setup or inspection related to attention kernels.

    1 call · #0119–#0119

    env <vars> python3 -m <module> -x -q -p <val> <flag> <args>
  103. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0120–#0120

    tail -n <n> <path>
  104. Validate · Attention kernels

    1 tool error

    Requested script or workload execution and environment setup or inspection related to attention kernels.

    1 call · #0121–#0121

    python3 - <script>env <vars> python3 -m <module> -x -q -p <val> <flag> <args>
  105. Inspect · Source & workspace

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

    2 calls · #0122–#0123

    tail -n <n> <path>git status --short
  106. Inspect · Benchmark & validation setup

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

    1 call · #0124–#0124

    ps <flag> <args>rg <val>
  107. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0125–#0125

    cat <path>
  108. Inspect · Benchmark & validation setup

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

    1 call · #0126–#0126

    rg -n <val> <path> <path>head -n <n>
  109. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0127–#0127

    cat <path>
  110. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0128–#0128

    Apply patch <patch>
  111. Inspect · Benchmark & validation setup

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

    1 call · #0129–#0129

    rg -n <val> <path>head -n <n>
  112. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0130–#0130

    cat <path>
  113. Inspect · Attention kernels

    Requested repository inspection related to attention kernels.

    1 call · #0131–#0131

    git diff --statgit diff <flag> <args>
  114. Inspect · Source & workspace

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

    2 calls · #0132–#0133

    sed -n <val> <path>rg -n <val> <path>
  115. Inspect · Latency & request handling

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

    1 call · #0134–#0134

    rg -n <val> <path> <path> <path>tail -n <n>
  116. Build · Runtime processes

    Requested script or workload execution related to runtime processes.

    1 call · #0135–#0135

    python3 - <script>
  117. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0136–#0137

    sed -n <val> <path>cat <path>
  118. Inspect · Latency & request handling

    Requested source searches related to latency & request handling.

    1 call · #0138–#0138

    rg -n <val> <path>
  119. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0139–#0139

    sed -n <val> <path>tail -n <n> <path>
  120. Inspect · Benchmark & validation setup

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

    1 call · #0140–#0140

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

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

    1 call · #0141–#0141

    python3 - <script>
  122. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0142–#0142

    sed -n <val> <path>
  123. Inspect · Source & workspace

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

    4 calls · #0143–#0146

    cat <path>tail -n <n> <path>rg -n <val> <path> <path> <path>head -n <n>sed -n <val> <path>
  124. Inspect · Benchmark & validation setup

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

    1 call · #0147–#0147

    rg --files <path> <path>tail -n <n>
  125. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    2 calls · #0148–#0149

    sed -n <val> <path>cat <path>
  126. Inspect · Benchmark & validation setup

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

    1 call · #0150–#0150

    tail -n <n> <path>
  127. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0151–#0151

    Apply patch <patch>
  128. Inspect · Runtime processes

    Requested repository inspection and script or workload execution related to runtime processes.

    1 call · #0152–#0152

    git diff --checkpython3 - <script>
  129. Validate · Latency & request handling

    Requested file and log inspection and script or workload execution related to latency & request handling.

    1 call · #0153–#0153

    cat > <path> <script>python3 <script>
  130. Inspect · Benchmark & validation setup

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

    1 call · #0154–#0154

    tail -n <n> <path>
  131. Inspect · Source & workspace

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

    1 call · #0155–#0155

    git <val> <val>rg --files <path>head -n <n>
  132. Validate · Speculative decoding

    Requested environment setup or inspection related to speculative decoding.

    1 call · #0156–#0156

    env <vars> python3 -m <module> -q -p <val> <flag> <args>
  133. Inspect · Benchmark & validation setup

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

    1 call · #0157–#0157

    ps <flag> <args>rg <val>
  134. Inspect · Source & workspace

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

    2 calls · #0158–#0159

    tail -n <n> <path>rg -l --glob <val> --glob <val> <val> <val> <val>head -n <n>
  135. Validate · Benchmark & validation setup

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

    1 call · #0160–#0160

    git -C <path> <val> --shortrg -n --hidden --glob <path> <val> <path> <path> <path> <val> -g <val> <args>head -n <n>
  136. Inspect · Source & workspace

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

    1 call · #0161–#0161

    ls <flag> <args>rg -n <val> <path>tail -n <n>
  137. Other · Source & workspace

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

    2 calls · #0162–#0163

    git <val> <val> <path>python3 - <script>
  138. Inspect · Benchmark & validation setup

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

    1 call · #0164–#0164

    tail -n <n> <path>
  139. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0165–#0165

    python3 <script>
  140. Inspect · Benchmark & validation setup

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

    1 call · #0166–#0166

    tail -n <n> <path>
  141. Validate · Benchmark & validation setup

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

    1 call · #0167–#0167

    python3 - <script>
  142. Inspect · Benchmark & validation setup

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

    1 call · #0168–#0168

    tail -n <n> <path>
  143. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0169–#0169

    python3 - <script>
  144. Validate · Benchmark & validation setup

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

    1 call · #0170–#0170

    python3 - <script>
  145. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0171–#0171

    python3 <script>
  146. Validate · Device memory

    Requested script or workload execution related to device memory.

    1 call · #0172–#0172

    python3 - <script>
  147. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0173–#0173

    sed -n <val> <path>
  148. Execute · Latency & request handling

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

    1 call · #0174–#0174

    python3 - <script>
  149. Validate · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0175–#0175

    python3 - <script>
  150. Validate · Benchmark & validation setup

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

    3 calls · #0176–#0178

    python3 - <script>
  151. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0179–#0179

    sed -n <val> <path>
  152. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0180–#0180

    python3 <script>
  153. Inspect · Source & workspace

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

    1 call · #0181–#0181

    rg -n <val> <path>head -n <n>sed -n <val> <path>
  154. Inspect · Benchmark & validation setup

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

    1 call · #0182–#0182

    rg --files <path>tail -n <n>
  155. Inspect · Latency & request handling

    Requested source searches related to latency & request handling.

    1 call · #0183–#0183

    rg -n <val> <path>
  156. Inspect · Source & workspace

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

    1 call · #0184–#0184

    sed -n <val> <path>rg -n <val> <path>tail -n <n>
  157. Execute · Latency & request handling

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

    1 call · #0185–#0185

    python3 - <script>
  158. Execute · Benchmark & validation setup

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

    2 calls · #0186–#0187

    python3 - <script>git diff --numstatgit status --short
  159. Inspect · Source & workspace

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

    1 call · #0188–#0188

    sed -n <val> <path>rg -n <val> <path>head -n <n>
  160. Execute · Benchmark & validation setup

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

    1 call · #0189–#0189

    python3 - <script>
  161. Other · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0190–#0190

    python3 - <script>
  162. Other · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0191–#0191

    git <val> <val>
  163. Execute · Latency & request handling

    Requested file and log inspection and script or workload execution related to latency & request handling.

    1 call · #0192–#0192

    cat > <path> <script>python3 <script>
  164. Execute · Benchmark & validation setup

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

    3 calls · #0193–#0195

    python3 - <script>
  165. Execute · Latency & request handling

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

    1 call · #0196–#0196

    python3 - <script>
  166. Execute · Benchmark & validation setup

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

    5 calls · #0197–#0201

    python3 - <script>
  167. Validate · Benchmark & validation setup

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

    2 calls · #0202–#0203

    python3 - <script>
  168. Execute · Benchmark & validation setup

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

    1 call · #0204–#0204

    python3 - <script>
  169. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0205–#0205

    python3 <script>
  170. Inspect · Source & workspace

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

    2 calls · #0206–#0207

    sed -n <val> <path>rg -n <val> <path>head -n <n>
  171. Validate · Latency & request handling

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

    2 calls · #0208–#0209

    python3 - <script>
  172. Execute · Latency & request handling

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

    2 calls · #0210–#0211

    python3 - <script>
  173. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0212–#0212

    python3 <script>
  174. Validate · Benchmark & validation setup

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

    2 calls · #0213–#0214

    python3 - <script>
  175. Execute · Benchmark & validation setup

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

    2 calls · #0215–#0216

    python3 - <script>
  176. Other · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0217–#0217

    python3 - <script>
  177. Execute · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0218–#0218

    python3 - <script>
  178. Inspect · Source & workspace

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

    2 calls · #0219–#0220

    rg -n <val> <path> <path>sed -n <val> <path>
  179. Execute · Benchmark & validation setup

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

    1 call · #0221–#0221

    python3 - <script>
  180. Inspect · Source & workspace

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

    1 call · #0222–#0222

    rg -n <val> <path> <path>rg -n <val> <path>head -n <n>
  181. Execute · Benchmark & validation setup

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

    5 calls · #0223–#0227

    python3 - <script>python3 <script>
  182. Validate · Benchmark & validation setup

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

    2 calls · #0228–#0229

    python3 - <script>
  183. Validate · Latency & request handling

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

    1 call · #0230–#0230

    python3 - <script>
  184. Execute · Benchmark & validation setup

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

    1 call · #0231–#0231

    python3 - <script>
  185. Inspect · Runtime processes

    Requested repository inspection and script or workload execution related to runtime processes.

    1 call · #0232–#0232

    git diff --checkpython3 - <script>
  186. Execute · Benchmark & validation setup

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

    4 calls · #0233–#0236

    python3 - <script>
  187. Inspect · Runtime processes

    Requested runtime inspection and source searches related to runtime processes.

    1 call · #0237–#0237

    ps <flag> <args>rg <val>
  188. Execute · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0238–#0238

    python3 - <script>
  189. Other · Device memory

    Requested runtime inspection related to device memory.

    1 call · #0239–#0239

    npu-smi info
  190. Inspect · Source & workspace

    Requested runtime inspection related to source & workspace.

    1 call · #0240–#0240

    ps -p <val> -o <val>
  191. Other · Source & workspace

    Requested tool activity related to source & workspace.

    2 calls · #0241–#0242

    <command> <args>
  192. Execute · Task requirements

    1 tool error

    Requested script or workload execution related to task requirements.

    1 call · #0243–#0243

    python3 - <script>
  193. Execute · Benchmark & validation setup

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

    1 call · #0244–#0244

    python3 - <script>
  194. Inspect · Runtime processes

    Requested script or workload execution related to runtime processes.

    1 call · #0245–#0245

    python3 - <script>
  195. Execute · Benchmark & validation setup

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

    2 calls · #0246–#0247

    bash <script> > <path> <n> >& <path>tail -n <n> <path>git status --shortgit diff --checkgit <val> <val>
  196. Rollback · Latency & request handling

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

    1 call · #0248–#0248

    python3 - <script>
  197. Validate · Speculative decoding

    Requested environment setup or inspection related to speculative decoding.

    1 call · #0249–#0249

    env <vars> python3 -m <module> -q -p <val> <flag> <args>
  198. Inspect · Source & workspace

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

    1 call · #0250–#0250

    tail -n <n> <path>git diff --statgit status --short
  199. Execute · Benchmark & validation setup

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

    1 call · #0251–#0251

    python3 - <script>
  200. Execute · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0252–#0252

    python3 - <script>
  201. Inspect · Benchmark & validation setup

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

    1 call · #0253–#0253

    ps <flag> <args>rg <val>
  202. Inspect · Runtime processes

    Requested repository inspection and script or workload execution related to runtime processes.

    1 call · #0254–#0254

    git diff --checkpython3 - <script>
  203. Execute · Benchmark & validation setup

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

    2 calls · #0255–#0256

    python3 - <script>
  204. Execute · Task requirements

    1 tool error

    Requested workspace file updates and environment setup or inspection related to task requirements.

    1 call · #0257–#0257

    mkdir -p <path>env <vars> bash <script> <flag> <args>
  205. Other · Source & workspace

    1 missing return

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

    1 call · #0258–#0258

    python3 - <script>bash <script> > <path> <n> >& <path>cat <path>git diff --checkgit status --shortgit <val> <val>

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 · 3 changed files

Base commit: 340db9201005fc64635bb25db1d2538f955761c3

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..08fa8038ca1e52467f8ee872bd5db57f5f5537a5 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,17 @@ class AscendAttnBackend(AttentionBackend):     def init_forward_metadata(self, forward_batch: ForwardBatch):         """Init the metadata for a forward pass."""         self.forward_metadata = ForwardMetadata()-        seq_lens_max = forward_batch.seq_lens.max()+        use_cpu_metadata = (+            forward_batch.spec_info is None+            and forward_batch.forward_mode+            in (ForwardMode.EXTEND, ForwardMode.MIXED, ForwardMode.DECODE)+        )+        if use_cpu_metadata and forward_batch.seq_lens_cpu is not None:+            # These lengths are maintained by the scheduler. Reducing on the+            # NPU and using the result as a slice bound would synchronize it.+            seq_lens_max = forward_batch.seq_lens_cpu.max().item()+        else:+            seq_lens_max = forward_batch.seq_lens.max()         if forward_batch.forward_mode.is_target_verify():             seq_lens_max += self.speculative_num_draft_tokens         elif (@@ -459,9 +469,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 use_cpu_metadata and forward_batch.extend_seq_lens_cpu is not None:+                self.forward_metadata.extend_seq_lens_cpu_int = torch.tensor(+                    forward_batch.extend_seq_lens_cpu,+                    dtype=torch.int32,+                    device="cpu",+                )+            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:diff --git a/python/sglang/srt/hardware_backend/npu/graph_runner/npu_cudagraph_backend.py b/python/sglang/srt/hardware_backend/npu/graph_runner/npu_cudagraph_backend.pyindex 105034c03c0fb36d35254f822b63908f5bd0a2a0..3d280fe8c3190dcb23e72674cdf7966c35880c34 100644--- a/python/sglang/srt/hardware_backend/npu/graph_runner/npu_cudagraph_backend.py+++ b/python/sglang/srt/hardware_backend/npu/graph_runner/npu_cudagraph_backend.py@@ -12,7 +12,7 @@ non-NPU hosts.  from __future__ import annotations -import threading+from concurrent.futures import ThreadPoolExecutor from contextlib import AbstractContextManager, contextmanager from functools import partial from typing import TYPE_CHECKING, Any, Callable, Dict, Optional@@ -56,6 +56,7 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend):         self._device_id = self._device_module.current_device()         self._tp_group = cuda_graph_runner.model_runner.tp_group         self._capture_stream = None+        self._update_executor: Optional[ThreadPoolExecutor] = None         self._memory_saver_adapter: Optional[Any] = TorchMemorySaverAdapter.create(             enable=enable_memory_saver             and get_bool_env_var("SGLANG_MEMORY_SAVER_CUDA_GRAPH")@@ -150,8 +151,10 @@ class NPUCudaGraphBackend(BaseCudaGraphBackend):         attr_type: Any = None,         cpu_update_input: list = None,     ) -> Any:-        """Rebind seq_lens on the recorded NPU graph in a background-        thread, then replay. Used when the model is not deepseek-nsa.+        """Rebind seq_lens on a persistent worker while replaying the graph.++        Used when the model is not deepseek-nsa. Updating must overlap replay:+        the NPU runtime can wait for replay while applying the new inputs.          Two calling conventions:         1. (legacy) seq_lens + attr_name + attr_type:@@ -165,18 +168,31 @@ 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 state is thread-local. This dedicated worker keeps its+            # device context across decode steps instead of recreating both+            # the thread and its context for every token.+            self._update_executor = ThreadPoolExecutor(+                max_workers=1,+                thread_name_prefix="sglang-npu-graph-update",+                initializer=self._device_module.set_device,+                initargs=(self._device_id,),+            )+        update = self._update_executor.submit(+            graph.update, cpu_update_input=cpu_update_input+        )+        try:+            graph.replay()+        finally:+            # Keep inputs alive until the update completes, and propagate+            # worker errors instead of losing them on a background thread.+            update.result()         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._pool = Nonediff --git a/python/sglang/test/ascend/test_npu_graph_replay.py b/python/sglang/test/ascend/test_npu_graph_replay.pynew file mode 100644index 0000000000000000000000000000000000000000..84c3369d9f5b8ef2ed8a82a8d776b91f6916e1e5--- /dev/null+++ b/python/sglang/test/ascend/test_npu_graph_replay.py@@ -0,0 +1,154 @@+"""Host-side NPU replay and attention metadata regression tests."""++import threading+import unittest+from types import SimpleNamespace+from unittest.mock import Mock++import torch++from sglang.srt.hardware_backend.npu.attention.ascend_backend import (+    AscendAttnBackend,+)+from sglang.srt.hardware_backend.npu.graph_runner.npu_cudagraph_backend import (+    NPUCudaGraphBackend,+)+from sglang.srt.model_executor.forward_batch_info import ForwardMode+++class _Graph:+    def __init__(self, update_error=False, replay_error=False):+        self.started = threading.Event()+        self.replayed = threading.Event()+        self.update_error = update_error+        self.replay_error = replay_error+        self.worker = None+        self.inputs = None++    def update(self, *, cpu_update_input):+        self.worker = threading.current_thread()+        self.inputs = cpu_update_input+        self.started.set()+        if not self.replayed.wait(timeout=5):+            raise TimeoutError("update must overlap replay")+        if self.update_error:+            raise RuntimeError("update failed")++    def replay(self):+        if not self.started.wait(timeout=5):+            raise TimeoutError("update was not submitted")+        self.replayed.set()+        if self.replay_error:+            raise RuntimeError("replay failed")+++class TestNPUReplay(unittest.TestCase):+    def make_backend(self):+        device = SimpleNamespace(current_device=lambda: 2, set_device=Mock())+        runner = SimpleNamespace(+            device_module=device, model_runner=SimpleNamespace(tp_group=None)+        )+        backend = NPUCudaGraphBackend(runner)+        self.addCleanup(backend.cleanup)+        return backend, device++    def test_reuses_worker_and_preserves_both_update_conventions(self):+        backend, device = self.make_backend()+        workers = []+        for i in range(3):+            graph = _Graph()+            output = object()+            backend._graphs[i] = graph+            backend._outputs[i] = output+            if i == 0:+                actual = backend.replay_with_input_update(+                    i,+                    [129, 257, 0],+                    attr_name="context_lens",+                    attr_type=torch.empty(0),+                )+                lengths = graph.inputs[0]["context_lens"]+                self.assertEqual(lengths.dtype, torch.int32)+                self.assertEqual(lengths.device.type, "cpu")+                self.assertEqual(lengths.tolist(), [129, 257, 0])+            else:+                updates = [{"actual_seq_lengths_kv": [i, 0]}, {"other": [i + 1]}]+                actual = backend.replay_with_input_update(+                    i, seq_lens=None, cpu_update_input=updates+                )+                self.assertIs(graph.inputs, updates)+            self.assertIs(actual, output)+            self.assertIsNot(graph.worker, threading.current_thread())+            workers.append(graph.worker)++        self.assertTrue(all(worker is workers[0] for worker in workers))+        device.set_device.assert_called_once_with(2)+        backend.cleanup()+        self.assertFalse(workers[0].is_alive())+        self.assertEqual(backend._graphs, {})+        self.assertEqual(backend._outputs, {})++    def test_update_and_replay_errors_leave_no_worker_after_cleanup(self):+        for update_error, replay_error, message in (+            (True, False, "update failed"),+            (False, True, "replay failed"),+        ):+            with self.subTest(message=message):+                backend, _ = self.make_backend()+                graph = _Graph(update_error, replay_error)+                backend._graphs[1] = graph+                backend._outputs[1] = object()+                with self.assertRaisesRegex(RuntimeError, message):+                    backend.replay_with_input_update(+                        1, [5], attr_name="actual_seq_lengths_kv"+                    )+                backend.cleanup()+                self.assertFalse(graph.worker.is_alive())++++class _DeviceLengths(torch.Tensor):+    """A tensor that rejects the synchronizing operations being eliminated."""++    def cpu(self, *args, **kwargs):+        raise AssertionError("unexpected device-to-host copy")++    def max(self, *args, **kwargs):+        raise AssertionError("unexpected device reduction")+++class TestNPUAttentionMetadata(unittest.TestCase):+    def test_prefill_uses_cpu_lengths_for_bounds_and_attention_arguments(self):+        backend = AscendAttnBackend.__new__(AscendAttnBackend)+        backend.req_to_token_pool = SimpleNamespace(+            req_to_token=torch.arange(512, dtype=torch.int32).reshape(2, 256)+        )+        backend.page_size = 128+        backend.is_hybrid_swa = False+        backend.use_mla = False+        backend.use_sliding_window_kv_pool = False+        backend.device = "cpu"+        batch = SimpleNamespace(+            forward_mode=ForwardMode.EXTEND,+            spec_info=None,+            req_pool_indices=torch.tensor([0, 1]),+            seq_lens=torch.tensor([129, 256], dtype=torch.int32).as_subclass(+                _DeviceLengths+            ),+            seq_lens_cpu=torch.tensor([129, 256], dtype=torch.int64),+            extend_seq_lens=torch.tensor([1, 128], dtype=torch.int32).as_subclass(+                _DeviceLengths+            ),+            extend_seq_lens_cpu=[1, 128],+        )+        backend.init_forward_metadata(batch)+        metadata = backend.forward_metadata+        self.assertEqual(metadata.block_tables.tolist(), [[0, 1], [2, 3]])+        self.assertEqual(metadata.seq_lens_cpu_int.tolist(), [129, 256])+        self.assertEqual(metadata.extend_seq_lens_cpu_int.tolist(), [1, 128])+        self.assertEqual(metadata.extend_seq_lens_cpu_int.dtype, torch.int32)+        self.assertEqual(metadata.extend_seq_lens_cpu_int.device.type, "cpu")+++if __name__ == "__main__":+    unittest.main()