GPT-6 Astra · Serving

S07 · SGLang 8B

Valid

SGLang Qwen3-8B CodeOpt saturation 1dev · Implementation Optimization

1.03×PERFORMANCE RATIO
282TOOL 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 · 282 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
164Inspect
15Edit
8Build
25Validate
10Execute
16Profile
44Other

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 timeline238 groups · 282 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 workspace inspection, environment setup or inspection and source searches related to task requirements.

    2 calls · #0001–#0002

    pwdprintenv <vars>rg --files -g <val> -g <val> -g <val> <path> <path> <n> > <path>cat <path> <path>
  2. Build · Task requirements

    1 tool error

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

    1 call · #0003–#0003

    git status --shortrg --files -g <val> -g <val> -g <val> -g <val> <path> <val>ls -l -a <path> <path> <path> <n> > <path>
  3. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0004–#0004

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

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

    1 call · #0005–#0005

    cat <path> <path> <path> <path> <path> <path>
  5. Inspect · Batching & scheduling

    Requested source searches and repository inspection related to batching & scheduling.

    1 call · #0006–#0006

    rg --files <path>git status <flag> <args>rg <val>
  6. Inspect · Benchmark & validation setup

    Requested source searches related to benchmark & validation setup.

    1 call · #0007–#0007

    rg -n <val> <path>
  7. Other · Task requirements

    Requested script or workload execution related to task requirements.

    1 call · #0008–#0008

    python - <script>
  8. Other · Source & workspace

    1 tool error

    Requested script or workload execution related to source & workspace.

    1 call · #0009–#0009

    bash <script>
  9. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0010–#0011

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

    Requested environment setup or inspection related to source & workspace.

    1 call · #0012–#0012

    env <vars> bash <script>
  11. Inspect · Source & workspace

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

    1 call · #0013–#0013

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

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

    4 calls · #0014–#0017

    sed -n <val> <path>cat <path>rg -n <val> <path> <path>rg -n <val> <path>
  13. Validate · Device memory

    Requested file and log inspection and runtime inspection related to device memory.

    1 call · #0018–#0018

    tail -n <n> <path>npu-smi info
  14. Inspect · Attention kernels

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

    2 calls · #0019–#0020

    sed -n <val> <path>ps <flag> <args>head -n <n>rg -n <val> <path> <path>
  15. Inspect · Device memory

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

    1 call · #0021–#0021

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

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

    2 calls · #0022–#0023

    tail -n <n> <path>sed -n <val> <path>rg -n <val> <path>
  17. Validate · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0024–#0024

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

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

    3 calls · #0025–#0027

    rg -n <val> <path> <path> <path> <path>head -n <n>sed -n <val> <path>cat <path>rg -n <val> <path>tail -n <n>
    2 more command sketches
    tail -c <n> <path>rg -n <val> <path> -g <path>
  19. Profile · Attention kernels

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

    1 call · #0028–#0028

    rg -v <val> <path>tail -n <n>python - <script>sed -n <val> <path>rg -n <val> <path>
  20. Inspect · Task requirements

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

    1 call · #0029–#0029

    rg -n <val> <path>tail -n <n>head -n <n>rg -n <val> <path> <path>
  21. Inspect · Source & workspace

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

    1 call · #0030–#0030

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

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

    1 call · #0031–#0031

    rg -v <val> <path>tail -n <n>cat <path>
  23. Profile · Benchmark & validation setup

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

    1 call · #0032–#0032

    cat > <path> <script>
  24. Validate · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0033–#0033

    env <vars> bash <script> > <path> <n> >& <path>
  25. Inspect · Benchmark & validation setup

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

    1 call · #0034–#0034

    rg -v <val> <path>tail -n <n>tail -c <n> <path>
  26. Inspect · Attention kernels

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

    1 call · #0035–#0035

    cat > <path> <script>python - <script>
  27. Validate · Benchmark & validation setup

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

    1 call · #0036–#0036

    cp <path> <path>python <script> > <path> <n> > <path>
  28. Inspect · Source & workspace

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

    2 calls · #0037–#0038

    cat <path>tail -n <n> <path>git status --shortsed -n <val> <path>
  29. Inspect · Runtime processes

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

    1 call · #0039–#0039

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

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

    1 call · #0040–#0040

    rg --files <path>rg <val>head -n <n>sed -n <val> <path>rg -n <val> <path>tail -n <n>
    2 more command sketches
    tail -n <n> <path>rg -v <val> <path>
  31. Inspect · Runtime processes

    Requested script or workload execution, source searches and file and log inspection related to runtime processes.

    1 call · #0041–#0041

    python - <script>rg -v <val> <path>tail -n <n>git diff --stat
  32. Validate · Benchmark & validation setup

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

    1 call · #0042–#0042

    python - <script>
  33. Edit · Attention kernels

    Requested code edits related to attention kernels.

    2 calls · #0043–#0044

    Apply patch <patch>
  34. Other · Attention kernels

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

    1 call · #0045–#0045

    python - <script>git diff --stat
  35. Inspect · Runtime processes

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

    1 call · #0046–#0046

    git status --shortrg -v <val> <path>tail -n <n>ls -l -h <path> <path> <n> > <path>sed -n <val> <path>
  36. Inspect · Latency & request handling

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

    1 call · #0047–#0047

    python - <script>sed -n <val> <path>rg -n <val> <path> -g <path>head -n <n>
  37. Inspect · Source & workspace

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

    1 call · #0048–#0048

    sed -n <val> <path>rg --files <path>rg <path>head -n <n>
  38. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0049–#0049

    Apply patch <patch>
  39. Build · Attention kernels

    1 tool error

    Requested environment setup or inspection related to attention kernels.

    1 call · #0050–#0050

    env <vars> bash <script> > <path> <n> >& <path>
  40. Inspect · Runtime processes

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

    1 call · #0051–#0051

    rg --files <path>head -n <n>sed -n <val> <path>rg -n <val> <path>rg -v <val> <path>tail -n <n>
    1 more command sketches
    cat <path>
  41. Build · Source & workspace

    Requested environment setup or inspection related to source & workspace.

    1 call · #0052–#0052

    env <vars> python -B - <script>
  42. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0053–#0053

    python - <script>
  43. Build · Dependencies & build setup

    1 tool error

    Requested source searches and file and log inspection related to dependencies & build setup.

    1 call · #0054–#0054

    rg -n <val> <path> <path> <path> <path> <n> > <path>head -n <n>rg -a -l -F <val> <path> <path> <path> <n> > <path>
  44. Inspect · Source & workspace

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

    1 call · #0055–#0055

    rg -a -L -l -F <val> <path> <path> <path> <path> <n> > <path>sed -n <val> <path>rg -n <val> <path> <path> --glob <val> --glob <val> --glob <val>head -n <n>
  45. Inspect · Runtime processes

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

    1 call · #0056–#0056

    rg -n <val> <path> <path> <path> <n> > <path><command> <args>rg <val>head -n <n>printenv <vars>rg -v <val> <path>
    1 more command sketches
    tail -n <n>
  46. Inspect · Source & workspace

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

    1 call · #0057–#0057

    printenv <vars><command> <args>rg <val>head -n <n>rg -n <val> <path> <path> <n> > <path>
  47. Build · Runtime processes

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

    1 call · #0058–#0058

    mkdir -p <path>env <vars> python -B - <script>
  48. Inspect · Source & workspace

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

    1 call · #0059–#0059

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

    Requested script or workload execution related to attention kernels.

    1 call · #0060–#0060

    python - <script>
  50. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0061–#0061

    Apply patch <patch>
  51. Build · Attention kernels

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

    1 call · #0062–#0062

    python - <script>env <vars> bash <script> > <path> <n> >& <path>git status --short
  52. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0063–#0063

    Apply patch <patch>
  53. Build · Runtime processes

    Requested script or workload execution, source searches and file and log inspection related to runtime processes.

    1 call · #0064–#0064

    python - <script>rg -v <val> <path>tail -n <n>cat <path>git diff --check
  54. Inspect · Batching & scheduling

    1 tool error

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

    2 calls · #0065–#0066

    rg -n <val> <path> <path>sed -n <val> <path>rg -v <val> <path>tail -n <n>tail -c <n> <path>
  55. Profile · Rollout generation

    Requested file and log inspection and script or workload execution related to rollout generation.

    1 call · #0067–#0067

    cat > <path> <script>python - <script>
  56. Inspect · Batching & scheduling

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

    1 call · #0068–#0068

    python - <script>rg -v <val> <path>tail -n <n>
  57. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0069–#0069

    python - <script>
  58. Inspect · Device memory

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

    3 calls · #0070–#0072

    sed -n <val> <path>rg -n <val> <path> <path> -g <path>rg -n <val> <path>cat <path>head -n <n>rg -n <val> <path> -g <path>
  59. Inspect · Runtime processes

    Requested script or workload execution, source searches and file and log inspection related to runtime processes.

    1 call · #0073–#0073

    python - <script>rg -v <val> <path>tail -n <n>rg -n <val> <path>
  60. Execute · Benchmark & validation setup

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

    1 call · #0074–#0074

    python - <script>rg -v <val> <path>tail -n <n>
  61. Execute · Task requirements

    Requested script or workload execution and environment setup or inspection related to task requirements.

    1 call · #0075–#0075

    python - <script>env <vars> python <script> <val> <val> > <path> <n> >& <path>
  62. Execute · Benchmark & validation setup

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

    1 call · #0076–#0076

    python - <script>rg -v <val> <path>tail -n <n>
  63. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0077–#0077

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

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

    1 call · #0078–#0078

    tail -n <n> <path>git status --short
  65. Validate · Attention kernels

    1 tool error

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

    1 call · #0079–#0079

    python - <script>env <vars> python -m <module> -q <script> -x -o <path> > <path> <args>
  66. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0080–#0080

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

    Requested environment setup or inspection, source searches and file and log inspection related to attention kernels.

    1 call · #0081–#0081

    printenv <vars>rg --files <val>rg <val>head -n <n>
  68. Other · Attention kernels

    Requested script or workload execution related to attention kernels.

    1 call · #0082–#0082

    python - <script>
  69. Inspect · Source & workspace

    2 tool errors

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

    3 calls · #0083–#0085

    tail -n <n> <path>rg -n <val> <path>ps <flag> <args>head -n <n>
  70. Validate · Attention kernels

    1 tool error

    Requested environment setup or inspection related to attention kernels.

    1 call · #0086–#0086

    env <vars> python -m <module> -q <script> -o <path> > <path> <n> <args>
  71. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0087–#0087

    Apply patch <patch>
  72. Validate · Attention kernels

    1 tool error

    Requested environment setup or inspection related to attention kernels.

    1 call · #0088–#0088

    env <vars> python -m <module> -q <script> -x -o <path> > <path> <args>
  73. Inspect · Runtime processes

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

    2 calls · #0089–#0090

    rg -n <val> <path>head -n <n>tail -n <n> <path>tail -n <n>sed -n <val> <path>
  74. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0091–#0091

    Apply patch <patch>
  75. Inspect · Source & workspace

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

    2 calls · #0092–#0093

    tail -n <n> <path>rg -n <val> <path>tail -n <n>ps <flag> <args>head -n <n>
  76. Validate · Attention kernels

    Requested environment setup or inspection related to attention kernels.

    1 call · #0094–#0094

    env <vars> python -m <module> -q <script> -x -o <path> > <path> <args>
  77. Inspect · Source & workspace

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

    1 call · #0095–#0095

    tail -n <n> <path>git diff --check
  78. Other · Source & workspace

    Requested environment setup or inspection related to source & workspace.

    1 call · #0096–#0096

    env <vars> python <script> > <path> <n> > <path>
  79. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0097–#0097

    cat <path>tail -n <n> <path>
  80. Inspect · Benchmark & validation setup

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

    1 call · #0098–#0098

    tail -n <n> <path>rg -v <val> <path>tail -n <n>git diff --statgit status --short
  81. Profile · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0099–#0099

    env <vars> python <script> <val> > <path> <n> >& <path>
  82. Inspect · Benchmark & validation setup

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

    1 call · #0100–#0100

    tail -n <n> <path>rg -v <val> <path>tail -n <n>
  83. Inspect · Source & workspace

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

    1 call · #0101–#0101

    rg --files <path>head -n <n>sed -n <val> <path>
  84. Profile · Source & workspace

    Requested script or workload execution related to source & workspace.

    4 calls · #0102–#0105

    python - <script>
  85. Edit · Device memory

    Requested code edits related to device memory.

    1 call · #0106–#0106

    Apply patch <patch>
  86. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0107–#0107

    Apply patch <patch>
  87. Validate · Benchmark & validation setup

    Requested environment setup or inspection related to benchmark & validation setup.

    1 call · #0108–#0108

    env <vars> python -m <module> -q <script> <script> <script> -x -o <path> <args>
  88. Inspect · Source & workspace

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

    1 call · #0109–#0109

    tail -n <n> <path>git diff --checkgit diff --stat
  89. Other · Attention kernels

    Requested script or workload execution related to attention kernels.

    1 call · #0110–#0110

    python - <script>
  90. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0111–#0111

    Apply patch <patch>
  91. Inspect · Device memory

    Requested repository inspection related to device memory.

    1 call · #0112–#0112

    git diff --checkgit diff <flag> <args>
  92. Edit · Device memory

    Requested code edits related to device memory.

    1 call · #0113–#0113

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

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

    1 call · #0114–#0114

    tail -n <n> <path>rg -v <val> <path>tail -n <n>
  94. Inspect · Runtime processes

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

    1 call · #0115–#0115

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

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

    1 call · #0116–#0116

    rg -n <val> <path>head -n <n>sed -n <val> <path>tail -n <n> <path>rg -v <val> <path>tail -n <n>
  96. Profile · Task requirements

    1 tool error

    Requested environment setup or inspection related to task requirements.

    1 call · #0117–#0117

    env <vars> python <script> <val> > <path> <n> >& <path>
  97. Profile · Device memory

    Requested file and log inspection and runtime inspection related to device memory.

    1 call · #0118–#0118

    tail -n <n> <path>cat <path>npu-smi infops <flag> <args>head -n <n>
  98. Validate · Device memory

    Requested script or workload execution related to device memory.

    1 call · #0119–#0119

    python - <script>
  99. Inspect · Source & workspace

    Requested runtime inspection related to source & workspace.

    1 call · #0120–#0120

    ps <flag> <args>
  100. Inspect · Benchmark & validation setup

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

    1 call · #0121–#0121

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

    Requested repository inspection related to source & workspace.

    1 call · #0122–#0122

    git status --short
  102. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0123–#0123

    cat <path>
  103. Inspect · Device memory

    Requested repository inspection related to device memory.

    1 call · #0124–#0124

    git diff <flag> <args>
  104. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0125–#0126

    tail -n <n> <path>cat <path>
  105. Profile · Task requirements

    1 tool error

    Requested environment setup or inspection related to task requirements.

    1 call · #0127–#0127

    env <vars> python <script> <val> > <path> <n> >& <path>
  106. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0128–#0128

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

    Requested source searches related to benchmark & validation setup.

    1 call · #0129–#0129

    rg --files <val> -g <val> -g <val> -g <val>
  108. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0130–#0130

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

    1 tool error

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

    3 calls · #0131–#0133

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

    Requested file and log inspection related to source & workspace.

    1 call · #0134–#0134

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

    Requested tool activity related to source & workspace.

    1 call · #0135–#0135

    command -v <val>
  112. Validate · Device memory

    Requested script or workload execution related to device memory.

    1 call · #0136–#0136

    python - <script>
  113. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0137–#0137

    cat <path>
  114. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0138–#0138

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

    Requested file and log inspection related to attention kernels.

    1 call · #0139–#0139

    cat <path>
  116. Inspect · Source & workspace

    1 tool error

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

    4 calls · #0140–#0143

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

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

    1 call · #0144–#0144

    tail -n <n> <path>
  118. Inspect · Runtime processes

    Requested source searches related to runtime processes.

    1 call · #0145–#0145

    rg -n <val> <path> <path>
  119. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0146–#0146

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

    1 tool error

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

    3 calls · #0147–#0149

    cat <path>rg -n <val> <path> <path> <path>rg -n <val> <path>sed -n <val> <path>
  121. Inspect · Device memory

    1 tool error

    Requested source searches related to device memory.

    1 call · #0150–#0150

    rg -n <val> <path> <path>
  122. Validate · Device memory

    Requested environment setup or inspection related to device memory.

    1 call · #0151–#0151

    env <vars> python -m <module> -q <script> <script> <script> -x -o <path> <args>
  123. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0152–#0152

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

    Requested file and log inspection related to device memory.

    1 call · #0153–#0153

    tail -n <n> <path>cat <path>
  125. Inspect · Benchmark & validation setup

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

    1 call · #0154–#0154

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

    1 tool error

    Requested source searches related to source & workspace.

    1 call · #0155–#0155

    command -v <val>rg -n <val> <val> <path> <path>
  127. Inspect · Device memory

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

    2 calls · #0156–#0157

    tail -n <n> <path>rg -n <val> <path> <path>git diff --stat
  128. Validate · Device memory

    Requested environment setup or inspection and script or workload execution related to device memory.

    2 calls · #0158–#0159

    env <vars> python <script> <val> <val> > <path> <n> >& <path>python - <script>
  129. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0160–#0160

    cat <path>
  130. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0161–#0161

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

    Requested source searches related to device memory.

    1 call · #0162–#0162

    rg --files <val> <path>rg <val>
  132. Inspect · Attention kernels

    Requested repository inspection and source searches related to attention kernels.

    1 call · #0163–#0163

    git diff <flag> <args>rg -n <val> <path>
  133. Inspect · Benchmark & validation setup

    Requested source searches related to benchmark & validation setup.

    1 call · #0164–#0164

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

    Requested file and log inspection related to attention kernels.

    1 call · #0165–#0165

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

    Requested script or workload execution related to source & workspace.

    1 call · #0166–#0166

    python - <script>
  136. Inspect · Benchmark & validation setup

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

    1 call · #0167–#0167

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

    Requested repository inspection related to source & workspace.

    1 call · #0168–#0168

    git <val> <val> <flag>
  138. Execute · Benchmark & validation setup

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

    1 call · #0169–#0169

    python - <script>
  139. Inspect · Checkpoints & weight state

    Requested file and log inspection and script or workload execution related to checkpoints & weight state.

    1 call · #0170–#0170

    cat > <path> <script>python - <script>
  140. Inspect · Source & workspace

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

    2 calls · #0171–#0172

    rg -n <val> <path> <path> <path>tail -n <n> <path>sed -n <val> <path>
  141. Inspect · Runtime processes

    Requested script or workload execution related to runtime processes.

    1 call · #0173–#0173

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

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

    1 call · #0174–#0174

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

    Requested script or workload execution related to source & workspace.

    1 call · #0175–#0175

    python - <script>
  144. Inspect · Benchmark & validation setup

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

    1 call · #0176–#0176

    tail -n <n> <path>
  145. Profile · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0177–#0177

    python - <script>
  146. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0178–#0178

    python - <script>
  147. Inspect · Benchmark & validation setup

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

    1 call · #0179–#0179

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

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

    2 calls · #0180–#0181

    rg -n <val> <path> -g <path> -g <val>head -n <n>rg -n <flag> <args>sed -n <val> <path>
  149. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0182–#0182

    python - <script>
  150. Inspect · Precision & numerical checks

    Requested file and log inspection related to precision & numerical checks.

    1 call · #0183–#0183

    cat > <path> <script>
  151. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0184–#0184

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

    Requested script or workload execution related to source & workspace.

    1 call · #0185–#0185

    python - <script>
  153. Inspect · Source & workspace

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

    1 call · #0186–#0186

    sed -n <val> <path>rg -n <val> <path> <path>
  154. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0187–#0187

    python - <script>
  155. Inspect · Benchmark & validation setup

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

    1 call · #0188–#0188

    tail -n <n> <path>
  156. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0189–#0189

    cat > <path> <script>
  157. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0190–#0190

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

    Requested script or workload execution related to source & workspace.

    2 calls · #0191–#0192

    python - <script>
  159. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0193–#0193

    tail -n <n> <path>
  160. Inspect · Device memory

    1 tool error

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

    1 call · #0194–#0194

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

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

    1 call · #0195–#0195

    tail -n <n> <path>
  162. Execute · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0196–#0196

    env <vars> bash <script> > <path> <n> >& <path>
  163. Inspect · Benchmark & validation setup

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

    1 call · #0197–#0197

    tail -n <n> <path>
  164. Execute · Device memory

    Requested script or workload execution and runtime inspection related to device memory.

    1 call · #0198–#0198

    python - <script>npu-smi info
  165. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0199–#0199

    python - <script>
  166. Other · Checkpoints & weight state

    Requested environment setup or inspection related to checkpoints & weight state.

    1 call · #0200–#0200

    env <vars> python <script> > <path> <n> >& <path>
  167. Edit · Device memory

    Requested code edits related to device memory.

    1 call · #0201–#0201

    Apply patch <patch>
  168. Inspect · Checkpoints & weight state

    Requested file and log inspection related to checkpoints & weight state.

    1 call · #0202–#0202

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

    Requested code edits related to source & workspace.

    1 call · #0203–#0203

    Apply patch <patch>
  170. Validate · Device memory

    Requested environment setup or inspection related to device memory.

    1 call · #0204–#0204

    env <vars> python -m <module> -q <script> -x -o <path> > <path> <args>
  171. Inspect · Device memory

    Requested file and log inspection related to device memory.

    2 calls · #0205–#0206

    tail -n <n> <path>
  172. Validate · Device memory

    Requested environment setup or inspection related to device memory.

    1 call · #0207–#0207

    env <vars> python <script> <val> <val> > <path> <n> >& <path>
  173. Inspect · Device memory

    Requested file and log inspection related to device memory.

    1 call · #0208–#0208

    tail -n <n> <path>
  174. Validate · Device memory

    Requested script or workload execution related to device memory.

    1 call · #0209–#0209

    python - <script>
  175. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0210–#0210

    Apply patch <patch>
  176. Inspect · Source & workspace

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

    1 call · #0211–#0211

    tail -n <n> <path>git diff --check
  177. Validate · Benchmark & validation setup

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

    2 calls · #0212–#0213

    python - <script>env <vars> python -m <module> -q <script> -x -o <path> > <path> <args>
  178. Inspect · Source & workspace

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

    2 calls · #0214–#0215

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

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

    1 call · #0216–#0216

    tail -n <n> <path>
  180. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0217–#0217

    Apply patch <patch>
  181. Other · Attention kernels

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

    1 call · #0218–#0218

    python - <script>git diff --check
  182. Inspect · Benchmark & validation setup

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

    1 call · #0219–#0219

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

    Requested repository inspection related to source & workspace.

    1 call · #0220–#0220

    git status --shortgit diff --stat
  184. Inspect · Benchmark & validation setup

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

    1 call · #0221–#0221

    rg --files <val>head -n <n>tail -n <n> <path>
  185. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0222–#0222

    python - <script>
  186. Profile · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0223–#0223

    env <vars> python <script> <val> > <path> <n> >& <path>
  187. Profile · Source & workspace

    Requested script or workload execution related to source & workspace.

    3 calls · #0224–#0226

    python - <script>
  188. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0227–#0227

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

    Requested environment setup or inspection related to attention kernels.

    1 call · #0228–#0228

    env <vars> python -m <module> -q <script> <script> <script> <script> <script> -x <args>
  190. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0229–#0229

    cat > <path> <script>tail -n <n> <path>
  191. Other · Source & workspace

    Requested environment setup or inspection related to source & workspace.

    1 call · #0230–#0230

    env <vars> python <script> > <path> <n> >& <path>
  192. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0231–#0231

    tail -n <n> <path>
  193. Inspect · Runtime processes

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

    1 call · #0232–#0232

    python - <script>git diff --check
  194. Inspect · Device memory

    Requested repository inspection and file and log inspection related to device memory.

    1 call · #0233–#0233

    git diff <flag> <args>tail -n <n> <path>
  195. Build · Runtime processes

    Requested script or workload execution related to runtime processes.

    1 call · #0234–#0234

    python - <script>
  196. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0235–#0235

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

    Requested environment setup or inspection related to source & workspace.

    1 call · #0236–#0236

    env <vars> python <script> > <path> <n> >& <path>
  198. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0237–#0238

    tail -n <n> <path>cat <path>
  199. Inspect · Benchmark & validation setup

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

    1 call · #0239–#0239

    tail -n <n> <path>
  200. Validate · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0240–#0240

    env <vars> bash <script> > <path> <n> >& <path>
  201. Inspect · Runtime processes

    Requested script or workload execution related to runtime processes.

    1 call · #0241–#0241

    python - <script>
  202. Validate · Benchmark & validation setup

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

    1 call · #0242–#0242

    python - <script>
  203. Inspect · Benchmark & validation setup

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

    1 call · #0243–#0243

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

    Requested script or workload execution related to source & workspace.

    1 call · #0244–#0244

    python - <script>
  205. Inspect · Benchmark & validation setup

    Requested tool activity related to benchmark & validation setup.

    1 call · #0245–#0245

    du <flag> <args>
  206. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0246–#0246

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

    Requested script or workload execution related to source & workspace.

    2 calls · #0247–#0248

    python - <script>
  208. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0249–#0249

    tail -n <n> <path>
  209. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    2 calls · #0250–#0251

    python - <script>
  210. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0252–#0252

    tail -n <n> <path>
  211. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0253–#0253

    python - <script>
  212. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0254–#0254

    tail -n <n> <path>
  213. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0255–#0255

    python - <script>
  214. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0256–#0256

    python - <script>
  215. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0257–#0257

    tail -n <n> <path>
  216. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0258–#0258

    python - <script>
  217. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0259–#0259

    python - <script>
  218. Execute · Benchmark & validation setup

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

    1 call · #0260–#0260

    cat > <path> <script>
  219. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0261–#0261

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

    Requested script or workload execution related to source & workspace.

    2 calls · #0262–#0263

    python - <script>
  221. Execute · Task requirements

    Requested environment setup or inspection related to task requirements.

    1 call · #0264–#0264

    env <vars> python <script> <val> <val> > <path> <n> >& <path>
  222. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0265–#0265

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

    Requested script or workload execution related to source & workspace.

    1 call · #0266–#0266

    python <script>
  224. Inspect · Source & workspace

    Requested repository inspection related to source & workspace.

    1 call · #0267–#0267

    git diff --checkgit status --shortgit <val> <val> <flag>
  225. Validate · Attention kernels

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

    1 call · #0268–#0268

    python - <script>git diff --check
  226. Inspect · Batching & scheduling

    Requested file and log inspection related to batching & scheduling.

    1 call · #0269–#0269

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

    1 tool error

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

    1 call · #0270–#0270

    python - <script>cat > <path> <script>python <script> > <path> <n> >& <path>
  228. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0271–#0271

    cat <path>tail -n <n> <path>
  229. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0272–#0272

    python - <script>
  230. Inspect · Device memory

    Requested repository inspection related to device memory.

    1 call · #0273–#0273

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

    Requested file and log inspection related to source & workspace.

    1 call · #0274–#0274

    tail -n <n> <path>
  232. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0275–#0275

    python - <script>
  233. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0276–#0276

    python - <script>
  234. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0277–#0277

    tail -n <n> <path>
  235. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0278–#0278

    python - <script>
  236. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    2 calls · #0279–#0280

    python - <script>bash <script> > <path> <n> >& <path>
  237. Execute · Batching & scheduling

    1 tool error

    Requested environment setup or inspection related to batching & scheduling.

    1 call · #0281–#0281

    env <vars> python <script> <val> <val> > <path> <n> >& <path>
  238. Execute · Benchmark & validation setup

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

    1 call · #0282–#0282

    python - <script>python <script> > <path> <n> >& <path>

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

Base commit: 340db9201005fc64635bb25db1d2538f955761c3

diff --git a/python/sglang/srt/hardware_backend/npu/allocator_npu.py b/python/sglang/srt/hardware_backend/npu/allocator_npu.pyindex 1a6ce9e6e4f73d1f004ed8ba6f109f9b19bb5dbf..94f5e0c8424e45b308c217da2189ef58d94f6aec 100644--- a/python/sglang/srt/hardware_backend/npu/allocator_npu.py+++ b/python/sglang/srt/hardware_backend/npu/allocator_npu.py@@ -41,11 +41,18 @@ class NPUPagedTokenToKVPoolAllocator(PagedTokenToKVPoolAllocator):             )          if num_new_pages is None:-            num_new_pages_tensor = (-                (seq_lens + self.roundup) // self.page_size-                - (prefix_lens + self.roundup) // self.page_size-            ).sum()-            num_new_pages_item = num_new_pages_tensor.item()+            if seq_lens_cpu is not None and prefix_lens_cpu is not None:+                num_new_pages_item = get_num_new_pages(+                    seq_lens=seq_lens_cpu,+                    page_size=self.page_size,+                    prefix_lens=prefix_lens_cpu,+                )+            else:+                num_new_pages_tensor = (+                    (seq_lens + self.roundup) // self.page_size+                    - (prefix_lens + self.roundup) // self.page_size+                ).sum()+                num_new_pages_item = num_new_pages_tensor.item()         else:             num_new_pages_item = num_new_pages         if self.need_sort and num_new_pages_item > len(self.free_pages):@@ -62,7 +69,18 @@ class NPUPagedTokenToKVPoolAllocator(PagedTokenToKVPoolAllocator):                 dtype=torch.int64,                 device=self.device,             )-            max_num_extend_tokens = next_power_of_2(extend_num_tokens)+            # Each program extends one request. A batch-wide bound launches+            # masked iterations for all the other requests' tokens and creates+            # extra compiler specializations as the batch size changes.+            max_extend = extend_num_tokens+            if (+                seq_lens_cpu is not None+                and prefix_lens_cpu is not None+                and len(seq_lens_cpu) > 0+            ):+                max_extend = (seq_lens_cpu - prefix_lens_cpu).max().item()+            block_size = 2048+            max_num_extend_tokens = max(block_size, next_power_of_2(max_extend))             bs = prefix_lens.shape[0]             alloc_extend_kernel[(bs,)](                 prefix_lens,@@ -73,6 +91,7 @@ class NPUPagedTokenToKVPoolAllocator(PagedTokenToKVPoolAllocator):                 next_power_of_2(bs),                 self.page_size,                 max_num_extend_tokens,+                BLOCK_SIZE=block_size,             )          else:diff --git a/python/sglang/srt/hardware_backend/npu/qkv_rmsnorm_rope.py b/python/sglang/srt/hardware_backend/npu/qkv_rmsnorm_rope.pynew file mode 100644index 0000000000000000000000000000000000000000..7c9e3bbf810258a0e326d781a162558c046029d8--- /dev/null+++ b/python/sglang/srt/hardware_backend/npu/qkv_rmsnorm_rope.py@@ -0,0 +1,276 @@+"""Tiled QKV normalization and rotary embedding for Ascend.++The general operator supplies the fallback for partial or interleaved RoPE.+The tiled path preserves its FP32 intermediates and final output casts.+"""++import torch+import triton+import triton.language as tl+import triton.language.extra.cann.extension as al+from sgl_kernel_npu.norm.split_qkv_rmsnorm_rope import (+    split_qkv_rmsnorm_rope as _split_qkv_rmsnorm_rope,+)+from sgl_kernel_npu.utils.triton_utils import get_device_properties+++@triton.jit+def _rmsnorm_rope_neox_tile(+    x,+    sin,+    cos,+    weight_ptr,+    bias_ptr,+    eps: tl.constexpr,+    ROWS: tl.constexpr,+    HEAD_DIM: tl.constexpr,+    HEADS_PER_TOKEN: tl.constexpr,+    NORMS: tl.constexpr,+    BIAS: tl.constexpr,+):+    if NORMS:+        weight = tl.load(weight_ptr + tl.arange(0, HEAD_DIM)).to(tl.float32)+        # Keep the original reduction and reciprocal shapes. CANN selects+        # different reduction/division implementations for larger row counts,+        # which can change rounding even when the reduction axis is unchanged.+        if BIAS:+            bias = tl.load(bias_ptr + tl.arange(0, HEAD_DIM)).to(tl.float32)+        normalized = tl.zeros((ROWS, HEAD_DIM), dtype=tl.float32)+        for row in tl.static_range(0, ROWS, HEADS_PER_TOKEN):+            values = al.extract_slice(+                x,+                offsets=(row, 0),+                sizes=(HEADS_PER_TOKEN, HEAD_DIM),+                strides=(1, 1),+            )+            variance = tl.sum(values * values, axis=1) / HEAD_DIM+            scale = (1 / tl.sqrt(variance + eps)).reshape(HEADS_PER_TOKEN, 1)+            values = values * scale+            if BIAS:+                values = values * weight + bias+            else:+                values = values * weight+            normalized = al.insert_slice(+                normalized,+                values,+                offsets=(row, 0),+                sizes=(HEADS_PER_TOKEN, HEAD_DIM),+                strides=(1, 1),+            )+        x = normalized++    x1 = al.extract_slice(+        x, offsets=(0, 0), sizes=(ROWS, HEAD_DIM // 2), strides=(1, 1)+    )+    x2 = al.extract_slice(+        x,+        offsets=(0, HEAD_DIM // 2),+        sizes=(ROWS, HEAD_DIM // 2),+        strides=(1, 1),+    )+    rotated = tl.zeros((ROWS, HEAD_DIM), dtype=tl.float32)+    rotated = al.insert_slice(+        rotated, -x2, offsets=(0, 0), sizes=(ROWS, HEAD_DIM // 2), strides=(1, 1)+    )+    rotated = al.insert_slice(+        rotated,+        x1,+        offsets=(0, HEAD_DIM // 2),+        sizes=(ROWS, HEAD_DIM // 2),+        strides=(1, 1),+    )+    return rotated * sin + x * cos+++@triton.jit+def split_qkv_rmsnorm_rope_tiled_kernel(+    input_ptr,+    sin_ptr,+    cos_ptr,+    q_ptr,+    k_ptr,+    v_ptr,+    q_weight_ptr,+    q_bias_ptr,+    k_weight_ptr,+    k_bias_ptr,+    batch_size,+    Q_SIZE: tl.constexpr,+    KV_SIZE: tl.constexpr,+    HEAD_DIM: tl.constexpr,+    eps: tl.constexpr,+    NORMS: tl.constexpr,+    BIAS: tl.constexpr,+    BLOCK_TOKENS: tl.constexpr,+):+    # Each program owns one KV head and its corresponding group of Q heads.+    # Tile the token dimension as well: the scalar-token loop spends most of+    # a long prefill issuing small vector operations and memory transfers.+    GROUP_SIZE: tl.constexpr = Q_SIZE // KV_SIZE+    TOTAL_SIZE: tl.constexpr = Q_SIZE + 2 * KV_SIZE+    Q_ROWS: tl.constexpr = BLOCK_TOKENS * GROUP_SIZE+    col_pid = tl.program_id(1)+    dims = tl.arange(0, HEAD_DIM)+    q_heads = tl.arange(0, Q_ROWS)+    q_cols = (col_pid * GROUP_SIZE + q_heads % GROUP_SIZE) * HEAD_DIM+    kv_cols = col_pid * HEAD_DIM + dims+    row_step = tl.num_programs(0) * BLOCK_TOKENS++    for start in tl.range(tl.program_id(0) * BLOCK_TOKENS, batch_size, row_step):+        q_rows = start + q_heads // GROUP_SIZE+        q_mask = q_rows[:, None] < batch_size+        q = tl.load(+            input_ptr+            + q_rows[:, None] * TOTAL_SIZE+            + q_cols[:, None]+            + dims[None, :],+            mask=q_mask,+            other=0,+        ).to(tl.float32)+        q_sin = tl.load(+            sin_ptr + q_rows[:, None] * HEAD_DIM + dims[None, :],+            mask=q_mask,+            other=0,+        ).to(tl.float32)+        q_cos = tl.load(+            cos_ptr + q_rows[:, None] * HEAD_DIM + dims[None, :],+            mask=q_mask,+            other=0,+        ).to(tl.float32)+        q = _rmsnorm_rope_neox_tile(+            q,+            q_sin,+            q_cos,+            q_weight_ptr,+            q_bias_ptr,+            eps,+            Q_ROWS,+            HEAD_DIM,+            GROUP_SIZE,+            NORMS,+            BIAS,+        )+        tl.store(+            q_ptr + q_rows[:, None] * Q_SIZE + q_cols[:, None] + dims[None, :],+            q.to(q_ptr.dtype.element_ty),+            mask=q_mask,+        )++        kv_rows = start + tl.arange(0, BLOCK_TOKENS)+        kv_mask = kv_rows[:, None] < batch_size+        k = tl.load(+            input_ptr + kv_rows[:, None] * TOTAL_SIZE + Q_SIZE + kv_cols[None, :],+            mask=kv_mask,+            other=0,+        ).to(tl.float32)+        k_sin = tl.load(+            sin_ptr + kv_rows[:, None] * HEAD_DIM + dims[None, :],+            mask=kv_mask,+            other=0,+        ).to(tl.float32)+        k_cos = tl.load(+            cos_ptr + kv_rows[:, None] * HEAD_DIM + dims[None, :],+            mask=kv_mask,+            other=0,+        ).to(tl.float32)+        k = _rmsnorm_rope_neox_tile(+            k,+            k_sin,+            k_cos,+            k_weight_ptr,+            k_bias_ptr,+            eps,+            BLOCK_TOKENS,+            HEAD_DIM,+            1,+            NORMS,+            BIAS,+        )+        tl.store(+            k_ptr + kv_rows[:, None] * KV_SIZE + kv_cols[None, :],+            k.to(k_ptr.dtype.element_ty),+            mask=kv_mask,+        )+        v = tl.load(+            input_ptr+            + kv_rows[:, None] * TOTAL_SIZE+            + Q_SIZE+            + KV_SIZE+            + kv_cols[None, :],+            mask=kv_mask,+            other=0,+        )+        tl.store(+            v_ptr + kv_rows[:, None] * KV_SIZE + kv_cols[None, :], v, mask=kv_mask+        )+++def split_qkv_rmsnorm_rope(+    input,+    sin,+    cos,+    q_hidden_size,+    kv_hidden_size,+    head_dim,+    eps=None,+    q_weight=None,+    k_weight=None,+    q_bias=None,+    k_bias=None,+    is_neox_style=True,+):+    group_size = q_hidden_size // kv_hidden_size+    if not (+        input.shape[0] >= 128+        and input.dtype in (torch.bfloat16, torch.float16)+        and is_neox_style+        and sin.shape[-1] == head_dim+        and head_dim in (64, 128)+        and group_size <= 8+        and (group_size & (group_size - 1)) == 0+    ):+        return _split_qkv_rmsnorm_rope(+            input,+            sin,+            cos,+            q_hidden_size,+            kv_hidden_size,+            head_dim,+            eps,+            q_weight,+            k_weight,+            q_bias,+            k_bias,+            is_neox_style,+        )++    assert triton.next_power_of_2(head_dim) == head_dim+    assert q_hidden_size % kv_hidden_size == 0+    _, num_vectorcore = get_device_properties()+    batch_size = input.shape[0]+    q = torch.empty(batch_size, q_hidden_size, device=input.device, dtype=input.dtype)+    k = torch.empty(batch_size, kv_hidden_size, device=input.device, dtype=input.dtype)+    v = torch.empty_like(k)+    cols = kv_hidden_size // head_dim+    rows = (num_vectorcore + cols - 1) // cols+    split_qkv_rmsnorm_rope_tiled_kernel[(rows, cols, 1)](+        input,+        sin,+        cos,+        q,+        k,+        v,+        q_weight,+        q_bias,+        k_weight,+        k_bias,+        batch_size,+        q_hidden_size,+        kv_hidden_size,+        head_dim,+        eps,+        eps is not None,+        q_bias is not None,+        BLOCK_TOKENS=min(8, 32 // group_size),+    )+    return q, k, vdiff --git a/python/sglang/srt/models/qwen3.py b/python/sglang/srt/models/qwen3.pyindex 9fbd046709e6d2d557b005f22d8b8586727fcec4..1600b6d8e73cee1313df60d1cd2203767b38f7e8 100644--- a/python/sglang/srt/models/qwen3.py+++ b/python/sglang/srt/models/qwen3.py@@ -55,9 +55,8 @@ if _use_aiter:         pass  if _is_npu:-    from sgl_kernel_npu.norm.split_qkv_rmsnorm_rope import split_qkv_rmsnorm_rope-     from sglang.srt.hardware_backend.npu.cmo import get_cmo_stream, wait_cmo_stream+    from sglang.srt.hardware_backend.npu.qkv_rmsnorm_rope import split_qkv_rmsnorm_rope   class Qwen3Attention(nn.Module):diff --git a/python/sglang/test/test_npu_allocator.py b/python/sglang/test/test_npu_allocator.pynew file mode 100644index 0000000000000000000000000000000000000000..82b6e46dcec2d04586e09746a964d2a4b281c411--- /dev/null+++ b/python/sglang/test/test_npu_allocator.py@@ -0,0 +1,94 @@+"""Ascend page allocation tests."""++from unittest.mock import Mock++import pytest+import torch++from sglang.srt.hardware_backend.npu.allocator_npu import (+    NPUPagedTokenToKVPoolAllocator,+)+++def _allocator(free_pages):+    allocator = object.__new__(NPUPagedTokenToKVPoolAllocator)+    allocator.page_size = 128+    allocator.roundup = 127+    allocator.debug_mode = False+    allocator.need_sort = False+    allocator.free_pages = torch.tensor(free_pages, dtype=torch.int64)+    allocator.merge_and_sort_free = Mock()+    return allocator+++def test_decode_allocates_pages_only_for_requests_crossing_a_boundary():+    allocator = _allocator([10, 11, 12])+    lengths = torch.tensor([129, 130, 257])+    result = allocator.alloc_decode(lengths, lengths, torch.tensor([511, 1024, 895]))+    torch.testing.assert_close(result, torch.tensor([1280, 1025, 1408], dtype=torch.int32))+    torch.testing.assert_close(allocator.free_pages, torch.tensor([12]))+++def test_decode_exhaustion_does_not_launch_allocation():+    allocator = _allocator([])+    assert allocator.alloc_decode(object(), torch.tensor([129]), object()) is None+    allocator.merge_and_sort_free.assert_called_once_with()+++def test_extend_checks_capacity_using_cpu_lengths():+    allocator = _allocator([])+    assert allocator.alloc_extend(+        object(), torch.tensor([127]), object(), torch.tensor([129]), object(), 2+    ) is None+++@pytest.mark.parametrize("use_cpu_lengths", [True, False])+@pytest.mark.parametrize(+    "prefixes,extensions",+    [+        ([0], [1]),+        ([127, 128, 129, 250], [1, 129, 2049, 4099]),+        ([0] * 33, [37 + i for i in range(33)]),+        ([1, 65, 129, 2048], [0, 0, 1, 3]),+        ([0, 64, 129], [8192, 2049, 128]),+    ],+)+def test_extend_token_locations_across_partial_and_full_pages(+    prefixes, extensions, use_cpu_lengths+):+    pytest.importorskip("torch_npu")+    torch.npu.set_compile_mode(jit_compile=False)+    allocator = _allocator(range(1, 200))+    allocator.device = "npu"+    allocator.free_pages = allocator.free_pages.to("npu")+    pages = allocator.free_pages.cpu().tolist()+    last_locs = [+        (1000 + i) * 128 + (prefix - 1) % 128 if prefix else -1+        for i, prefix in enumerate(prefixes)+    ]+    expected = []+    next_page = 0+    for prefix, extension, last in zip(prefixes, extensions, last_locs):+        old_page_tokens = min(extension, (-prefix) % 128)+        expected.extend(range(last + 1, last + 1 + old_page_tokens))+        remaining = extension - old_page_tokens+        expected.extend(+            pages[next_page + offset // 128] * 128 + offset % 128+            for offset in range(remaining)+        )+        next_page += (remaining + 127) // 128++    prefix_cpu = torch.tensor(prefixes, dtype=torch.int64)+    seq_cpu = prefix_cpu + torch.tensor(extensions, dtype=torch.int64)+    result = allocator.alloc_extend(+        prefix_cpu.to("npu"),+        prefix_cpu if use_cpu_lengths else None,+        seq_cpu.to("npu"),+        seq_cpu if use_cpu_lengths else None,+        torch.tensor(last_locs, dtype=torch.int64, device="npu"),+        sum(extensions),+    )+    torch.testing.assert_close(+        result.cpu(), torch.tensor(expected, dtype=torch.int32), rtol=0, atol=0+    )+    assert allocator.free_pages.cpu().tolist() == pages[next_page:]diff --git a/python/sglang/test/test_npu_qkv_rmsnorm_rope.py b/python/sglang/test/test_npu_qkv_rmsnorm_rope.pynew file mode 100644index 0000000000000000000000000000000000000000..c11bed650ba6c64b94be2e7662a5b30b8ffb4d39--- /dev/null+++ b/python/sglang/test/test_npu_qkv_rmsnorm_rope.py@@ -0,0 +1,114 @@+"""Check tiling against the scalar-token kernel, including its rounding."""++import pytest+import torch++pytest.importorskip("torch_npu")++from sgl_kernel_npu.norm.split_qkv_rmsnorm_rope import (+    split_qkv_rmsnorm_rope_kernel,+)+from sgl_kernel_npu.utils.triton_utils import get_device_properties++from sglang.srt.hardware_backend.npu.qkv_rmsnorm_rope import split_qkv_rmsnorm_rope+++def _reference(qkv, sin, cos, q_size, kv_size, head_dim, eps, qw, kw, qb, kb):+    tokens = qkv.shape[0]+    q = qkv.new_empty(tokens, q_size)+    k = qkv.new_empty(tokens, kv_size)+    v = qkv.new_empty(tokens, kv_size)+    _, cores = get_device_properties()+    cols = kv_size // head_dim+    rows = (cores + cols - 1) // cols+    split_qkv_rmsnorm_rope_kernel[(rows, cols, 1)](+        qkv,+        sin,+        cos,+        q,+        k,+        v,+        qw,+        qb,+        kw,+        kb,+        tokens,+        q_size,+        kv_size,+        q_size + 2 * kv_size,+        eps,+        q_size // kv_size * head_dim,+        head_dim,+        qb is not None,+        eps is not None,+        head_dim,+        head_dim,+        head_dim // 2,+        0,+        DO_PARTIAL=False,+        DO_HALF=True,+    )+    return q, k, v+++@pytest.mark.parametrize(+    "tokens,q_heads,kv_heads,head_dim,norm,bias",+    [+        (32, 32, 8, 128, True, False),+        (33, 32, 8, 128, True, True),+        (63, 32, 8, 128, False, False),+        (64, 16, 16, 64, True, True),+        (129, 16, 8, 128, True, False),+        (257, 64, 8, 128, True, True),+        (2048, 32, 8, 128, True, False),+        (8192, 32, 8, 128, True, False),+    ],+)+@pytest.mark.parametrize("dtype", [torch.bfloat16, torch.float16])+def test_tiled_matches_scalar(tokens, q_heads, kv_heads, head_dim, norm, bias, dtype):+    torch.manual_seed(123)+    q_size, kv_size = q_heads * head_dim, kv_heads * head_dim+    qkv = torch.randn(tokens, q_size + 2 * kv_size, device="npu", dtype=dtype)+    sin = torch.randn(tokens, 1, 1, head_dim, device="npu", dtype=dtype)+    cos = torch.randn_like(sin)+    qw = torch.randn(head_dim, device="npu", dtype=dtype) if norm else None+    kw = torch.randn_like(qw) if norm else None+    qb = torch.randn_like(qw) if bias else None+    kb = torch.randn_like(kw) if bias else None+    eps = 1e-6 if norm else None+    actual = split_qkv_rmsnorm_rope(+        qkv, sin, cos, q_size, kv_size, head_dim, eps, qw, kw, qb, kb+    )+    expected = _reference(qkv, sin, cos, q_size, kv_size, head_dim, eps, qw, kw, qb, kb)+    for a, b in zip(actual, expected):+        torch.testing.assert_close(a.cpu(), b.cpu(), rtol=0, atol=0)+++def test_graph_replay_uses_updated_inputs():+    torch.manual_seed(321)+    qkv = torch.randn(64, 6144, device="npu", dtype=torch.bfloat16)+    sin = torch.randn(64, 1, 1, 128, device="npu", dtype=torch.bfloat16)+    cos = torch.randn_like(sin)+    qw = torch.randn(128, device="npu", dtype=torch.bfloat16)+    kw = torch.randn_like(qw)++    def run():+        return split_qkv_rmsnorm_rope(qkv, sin, cos, 4096, 1024, 128, 1e-6, qw, kw)++    for _ in range(3):+        run()+    torch.npu.synchronize()+    graph = torch.npu.NPUGraph()+    stream = torch.npu.Stream()+    with torch.npu.graph(graph, stream=stream, auto_dispatch_capture=True):+        actual = run()+    for _ in range(3):+        qkv.copy_(torch.randn_like(qkv))+        sin.copy_(torch.randn_like(sin))+        cos.copy_(torch.randn_like(cos))+        graph.replay()+        expected = _reference(+            qkv, sin, cos, 4096, 1024, 128, 1e-6, qw, kw, None, None+        )+        for a, b in zip(actual, expected):+            torch.testing.assert_close(a.cpu(), b.cpu(), rtol=0, atol=0)