Kimi K3 · Serving

S08 · vLLM 8B

Valid

vLLM Ascend Qwen3-8B CodeOpt saturation 1dev · Implementation Optimization

1.03×PERFORMANCE RATIO
221TOOL EVENTS
1TEXT PATCHES
0BINARY NAMES

01 / PROCESS MAP

Agents over time

Compare agents on one time axis; overlapping spans line up vertically. Select an agent or bar to inspect its events.

Elapsed time · mm:ss

Agent / model
+08:03+14:05+20:07+26:10+32:12
Main agentKimi K3Main timeline · 147 calls
Subagent 1Kimi K3From Main agent · 74 calls

Time starts at the first recorded activity. Select a bar or agent to open its events. Bars span the first and last recorded observation, including gaps; colored ticks mark tool calls. A hollow diamond marks a delegation whose child timing is unavailable.

InspectEditValidateExecuteBuildProfileRollbackOther
175Inspect
12Edit
13Validate
5Execute
16Other

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 timeline115 groups · 221 calls · 1 subagents

Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>. Each branch belongs to its named agent. Expand a delegation to inspect its child; branches can run concurrently. Call numbers preserve source order, not a serial schedule. Times are relative to the first recorded activity.

Main agent

  1. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0075–#0075

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

    Requested file and log inspection related to task requirements.

    2 calls · #0076–#0077

    Read <path>
  3. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    1 call · #0078–#0078

    find <val> -type <val>sort
  4. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0079–#0079

    Read <path>
  5. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    2 calls · #0080–#0081

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

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

    3 calls · #0082–#0084

    Read <path>
  7. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0085–#0087

    Read <path>
  8. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    2 calls · #0088–#0089

    Read <path>
  9. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0090–#0090

    Read <path>
  10. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0091–#0091

    Read <path>
  11. Inspect · Source & workspace

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

    3 calls · #0092–#0094

    Read <path>cd <path>git log --oneline <flag> <args>catgit status <flag> <args>head -n <n>
    3 more command sketches
    echo <flag>ls <path> <n> > <path>ls <path>
  12. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    1 call · #0095–#0095

    Read <path>
  13. Inspect · Source & workspace

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

    1 call · #0096–#0096

    envgrep -E <val>sorthead -n <n>echo <flag>which <val> <val>
    1 more command sketches
    python3 --version
  14. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    2 calls · #0097–#0098

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

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

    1 call · #0099–#0099

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

    Requested file and log inspection related to source & workspace.

    1 call · #0100–#0100

    cat <path>head -n <n>
  17. Validate · Benchmark & validation setup

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

    2 calls · #0101–#0102

    cd <val>env <vars> bash <script> > <path> <n> >& <path>echo <val>head -c <n> <path>bash <script> > <path> <n> >& <path>
  18. Inspect · Source & workspace

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

    2 calls · #0103–#0104

    ls <path>echo <flag>ls <path> <n> > <path>Search <pattern> <path>
  19. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    1 call · #0105–#0105

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

    Requested file and log inspection related to source & workspace.

    2 calls · #0106–#0107

    Read <path>
  21. Other · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0108–#0108

    Read task output <task>
  22. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0109–#0109

    Search <pattern> <path>
  23. Inspect · Batching & scheduling

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

    2 calls · #0110–#0111

    Search <pattern> <path>Read <path>
  24. Inspect · Source & workspace

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

    2 calls · #0112–#0113

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

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

    1 call · #0114–#0114

    ls -l -a <path>tail -n <n> <path> <n> > <path>
  26. Inspect · Benchmark & validation setup

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

    1 call · #0115–#0115

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

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

    7 calls · #0116–#0122

    Search <pattern> <path>Read <path>Update task list <tasks>
  28. Validate · Benchmark & validation setup

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

    1 call · #0123–#0123

    sleep <n>grep -E <val> <path>head -n <n>echo <val>tail -n <n> <path>
  29. Other · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0124–#0124

    Read task output <task>
  30. Validate · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0125–#0125

    Delegate <task>
    Subagent 1· Kimi K3 · explore · 74 visible callsCompleted

    Delegated by Main agent at call #0125. Observed activity +09:55–+30:29.

    1. Inspect · Source & workspace

      Requested workspace inspection related to source & workspace.

      1 call · #0001–#0001

      ls <path>
    2. Other · Source & workspace

      Requested file and log inspection related to source & workspace.

      1 call · #0002–#0002

      wc -l <path> <path> <path> <n> > <path>
    3. Inspect · Task requirements

      Requested file and log inspection related to task requirements.

      1 call · #0003–#0003

      Read <path>
    4. Inspect · Source & workspace

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

      7 calls · #0004–#0010

      Read <path>Search <pattern> <path>
    5. Inspect · Attention kernels

      Requested source searches and workspace inspection related to attention kernels.

      2 calls · #0011–#0012

      Search <pattern> <path>ls <path> <path> <path> <path>
    6. Inspect · Source & workspace

      Requested file and log inspection related to source & workspace.

      2 calls · #0013–#0014

      Read <path>
    7. Inspect · Attention kernels

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

      3 calls · #0015–#0017

      wc -l <path> <path>Search <pattern> <path>Read <path>
    8. Inspect · Source & workspace

      Requested file and log inspection related to source & workspace.

      1 call · #0018–#0018

      Read <path>
    9. Inspect · Attention kernels

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

      4 calls · #0019–#0022

      Read <path>wc -l <path> <path> <path> <path>Search <pattern> <path>
    10. Inspect · Source & workspace

      Requested file and log inspection related to source & workspace.

      1 call · #0023–#0023

      Read <path>
    11. Inspect · Attention kernels

      Requested file and log inspection related to attention kernels.

      1 call · #0024–#0024

      Read <path>
    12. Inspect · Source & workspace

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

      4 calls · #0025–#0028

      Search <pattern> <path>Read <path>ls <path> <path>
    13. Inspect · Batching & scheduling

      Requested source searches related to batching & scheduling.

      1 call · #0029–#0029

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

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

      12 calls · #0030–#0041

      Read <path>Search <pattern> <path>head -n <n> <path>echo <val>ls <path>
    15. Inspect · Attention kernels

      Requested file and log inspection related to attention kernels.

      1 call · #0042–#0042

      Read <path>
    16. Inspect · Source & workspace

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

      11 calls · #0043–#0053

      Search <pattern> <path>Read <path>
    17. Inspect · Attention kernels

      Requested source searches related to attention kernels.

      2 calls · #0054–#0055

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

      Requested workspace inspection related to source & workspace.

      1 call · #0056–#0056

      ls <path>
    19. Inspect · Attention kernels

      Requested source searches related to attention kernels.

      1 call · #0057–#0057

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

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

      10 calls · #0058–#0067

      Read <path>wc -l <path>Search <pattern> <path>
    21. Inspect · Attention kernels

      Requested source searches related to attention kernels.

      1 call · #0068–#0068

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

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

      5 calls · #0069–#0073

      Read <path>Search <pattern> <path>
    23. Inspect · Attention kernels

      Requested source searches related to attention kernels.

      1 call · #0074–#0074

      Search <pattern> <path>
  31. Validate · Benchmark & validation setup

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

    1 call · #0126–#0126

    cat <path>echopython3 -c <script>
  32. Execute · Benchmark & validation setup

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

    1 call · #0127–#0127

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

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

    2 calls · #0128–#0129

    Update task list <tasks>Read <path>
  34. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0130–#0130

    Read <path>
  35. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0131–#0131

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

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

    2 calls · #0132–#0133

    Search <pattern> <path>Read <path>
  37. Other · Attention kernels

    Requested script or workload execution related to attention kernels.

    1 call · #0134–#0134

    python3 <n> > <path> <script>
  38. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    3 calls · #0135–#0137

    Read <path>
  39. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0138–#0138

    Read <path>
  40. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0139–#0139

    Search <pattern> <path>
  41. Inspect · Attention kernels

    Requested source searches related to attention kernels.

    1 call · #0140–#0140

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

    Requested file and log inspection related to source & workspace.

    1 call · #0141–#0141

    Read <path>
  43. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0142–#0142

    Read <path>
  44. Inspect · Source & workspace

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

    3 calls · #0143–#0145

    Search <pattern> <path>Read <path>
  45. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0146–#0146

    Read <path>
  46. Inspect · Source & workspace

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

    3 calls · #0147–#0149

    Search <pattern> <path>grep <flag> <args>head -n <n>ls <val>
  47. Other · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0150–#0150

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

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

    7 calls · #0151–#0157

    Read <path>Search <pattern> <path>ls <val>grep -E <val>tail -n <n> <path> <n> > <path>head -c <n>
  49. Inspect · Batching & scheduling

    Requested source searches related to batching & scheduling.

    1 call · #0158–#0158

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

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

    4 calls · #0159–#0162

    Read <path>Search <pattern> <path>
  51. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0163–#0163

    Edit <path>
  52. Inspect · Attention kernels

    Requested source searches related to attention kernels.

    2 calls · #0164–#0165

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

    Requested task coordination related to source & workspace.

    1 call · #0166–#0166

    Update task list <tasks>
  54. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0167–#0167

    Read <path>
  55. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0168–#0168

    Edit <path>
  56. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0169–#0169

    Read <path>
  57. Edit · Attention kernels

    Requested code edits related to attention kernels.

    2 calls · #0170–#0171

    Edit <path>
  58. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0172–#0172

    Read <path>
  59. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0173–#0173

    Read <path>
  60. Inspect · Attention kernels

    Requested file and log inspection related to attention kernels.

    1 call · #0174–#0174

    Read <path>
  61. Edit · Attention kernels

    Requested code edits related to attention kernels.

    1 call · #0175–#0175

    Edit <path>
  62. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0176–#0176

    Edit <path>
  63. Inspect · Attention kernels

    Requested source searches related to attention kernels.

    1 call · #0177–#0177

    Search <pattern> <path>
  64. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0178–#0178

    Edit <path>
  65. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0179–#0179

    Read <path>
  66. Edit · Source & workspace

    Requested code edits related to source & workspace.

    2 calls · #0180–#0181

    Edit <path>
  67. Other · Attention kernels

    Requested script or workload execution related to attention kernels.

    1 call · #0182–#0182

    cd <path>python3 -c <script>
  68. Inspect · Latency & request handling

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

    1 call · #0183–#0183

    ls <val>grep <val>python3 -c <script> <n> > <path>
  69. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0184–#0184

    python3 <n> > <path> <script>
  70. Execute · Benchmark & validation setup

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

    1 call · #0185–#0185

    python3 -c <script>cp <path> <path>
  71. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0186–#0186

    Read <path>
  72. Edit · Source & workspace

    Requested code edits related to source & workspace.

    3 calls · #0187–#0189

    Edit <path>
  73. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0190–#0190

    Search <pattern> <path>
  74. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    2 calls · #0191–#0192

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

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

    6 calls · #0193–#0198

    grep -r -n <val> <path> --include <path>headfind <path> -name <val> <n> > <path>xargs <val> <flag> <args>head -n <n>sed -n <val> <path>
    7 more command sketches
    echo <val>grep -n <val> <path>cd <path>sed -n <val>Read <path>grep -E <val> <path>tail -n <n>
  76. Validate · Benchmark & validation setup

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

    1 call · #0199–#0199

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

    Requested task coordination related to source & workspace.

    1 call · #0200–#0200

    Update task list <tasks>
  78. Validate · Benchmark & validation setup

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

    3 calls · #0201–#0203

    cat <path>python3 -c <script>cd <val>rm -f <val> <val> <val> <val> <val> <val>lsbash <script> > <path> <n> >& <path>
    1 more command sketches
    echo <val>
  79. Inspect · Source & workspace

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

    2 calls · #0204–#0205

    cd <path>git diff --statgit diffhead -n <n>Search <pattern> <path>
  80. Inspect · Device memory

    Requested source searches related to device memory.

    1 call · #0206–#0206

    Search <pattern> <path>
  81. Other · Source & workspace

    Requested execution waits related to source & workspace.

    1 call · #0207–#0207

    Wait for <task>
  82. Validate · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0208–#0208

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

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

    1 call · #0209–#0209

    cd <val>rm -f <val> <val> <val> <val> <val> <val>bash <script> > <path> <n> >& <path>echo <val>
  84. Inspect · Source & workspace

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

    2 calls · #0210–#0211

    cd <path>git status <flag>headecho <flag>grep -v <val>head -n <n>
    1 more command sketches
    Update task list <tasks>
  85. Inspect · Attention kernels

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

    1 call · #0212–#0212

    cd <path>grep -r -n <val> <path> <path> <path> <n> > <path>headpython3 -c <script> <n> > <path>
  86. Inspect · Source & workspace

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

    1 call · #0213–#0213

    sleep <n>ls <val>grep -E <val>python3 -c <script> <n> > <path>true
  87. Execute · Benchmark & validation setup

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

    1 call · #0214–#0214

    sleep <n>python3 -c <script> <n> > <path>truetail -n <n> <path> <n> > <path>head -c <n>
  88. Other · Source & workspace

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

    3 calls · #0215–#0217

    sleep <n>python3 -c <script> <n> > <path>trueWait for <task>
  89. Execute · Batching & scheduling

    Requested script or workload execution related to batching & scheduling.

    1 call · #0218–#0218

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

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

    1 call · #0219–#0219

    bash <script>echo <val>ps <val>grep -E <val>grep -v <val>head -n <n>
    1 more command sketches
    python3 -c <script>
  91. Execute · Benchmark & validation setup

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

    1 call · #0220–#0220

    cp <path> <path>cd <path>git diff --statpython3 -c <script>
  92. Inspect · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0221–#0221

    Update task list <tasks>

03 / CANDIDATE ARTIFACT

Text patches & binary names

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

vllm_ascend · 7 changed files

Base commit: 7c254c14e2f2db1185d739075ee3cdc1da3cfde2

diff --git a/vllm_ascend/_310p/ops/rotary_embedding.py b/vllm_ascend/_310p/ops/rotary_embedding.pyindex 26bc5d66e17bd5304613b7392cbb8708b2761702..bdfa8803d8f2bf798b10f2c594054f6ea2a73bae 100644--- a/vllm_ascend/_310p/ops/rotary_embedding.py+++ b/vllm_ascend/_310p/ops/rotary_embedding.py@@ -25,7 +25,16 @@ from vllm.model_executor.layers.rotary_embedding import MRotaryEmbedding from vllm.model_executor.layers.rotary_embedding.common import ApplyRotaryEmb from vllm.model_executor.layers.rotary_embedding.mrope import apply_interleaved_rope -from vllm_ascend.ops.rotary_embedding import AscendRotaryEmbedding, get_cos_and_sin_slice, update_cos_sin+from vllm_ascend.ops.rotary_embedding import (+    AscendRotaryEmbedding,+    get_cos_and_sin_slice,+    require_cos_sin_slice,+    update_cos_sin,+)++# The 310P rope path consumes `get_cos_and_sin_slice()`, so the per-step+# `update_cos_sin()` work must stay enabled on this platform.+require_cos_sin_slice()  # Filled once per model forward in NPUModelRunner310._model_forward; read by every MRoPE layer. _mrope_cos_slice: torch.Tensor | None = Nonediff --git a/vllm_ascend/attention/attention_v1.py b/vllm_ascend/attention/attention_v1.pyindex 1f78d080a8161b72da835db2b3487a111c114eed..f20448af7c8c289aa3b82055732e229dbfd1c697 100644--- a/vllm_ascend/attention/attention_v1.py+++ b/vllm_ascend/attention/attention_v1.py@@ -311,8 +311,10 @@ class AscendAttentionMetadataBuilder(AttentionMetadataBuilder[AscendMetadata]):         # Get attn_mask from singleton AttentionMaskBuilder         attn_mask = self.attn_mask_builder.get_attention_mask(common_attn_metadata.causal, self.model_config) -        # TODO: Yet another unnecessary H2D while we already have a query_start_loc on device-        query_start_loc = query_start_loc_cpu.pin_memory().to(self.device, non_blocking=True)+        # Reuse the query_start_loc tensor that the model runner already+        # uploaded to the device (identical content to query_start_loc_cpu),+        # instead of issuing a redundant H2D copy on every step.+        query_start_loc = common_attn_metadata.query_start_loc          actual_seq_lengths_q = query_start_loc_cpu[1:].tolist()         seq_lens_list = seq_lens.tolist()diff --git a/vllm_ascend/compilation/acl_graph.py b/vllm_ascend/compilation/acl_graph.pyindex 82a511d3a7de867d340dd93aef33025ca13444cf..e33fd3526cf34a50914ad239019148925a8f6490 100644--- a/vllm_ascend/compilation/acl_graph.py+++ b/vllm_ascend/compilation/acl_graph.py@@ -38,6 +38,31 @@ _STREAM_RESOURCE_GUIDANCE = (     "temporarily disabling graph mode to confirm the failure is capture-related." ) +# Ordering marker between FULL-graph replays and the graph-parameter update+# stream. Recording it on the main stream right before a replay enqueue marks+# a stream point that is reached only after all previously enqueued work+# (including the previous replay) has completed. The update stream waits on it+# device-side, which replaces a host-blocking `current_stream().synchronize()`+# that stalled the CPU on every decode step. `wait_event` snapshots the event+# state at call time, so re-recording it on the next step cannot disturb a+# wait that was already enqueued (the same re-record pattern the per-layer+# update ExternalEvents already rely on).+_replay_ordering_event: "torch.npu.Event | None" = None+++def record_replay_ordering_event() -> None:+    """Record the ordering marker on the current (main) stream."""+    global _replay_ordering_event+    if _replay_ordering_event is None:+        _replay_ordering_event = torch.npu.Event()+    _replay_ordering_event.record(torch.npu.current_stream())+++def wait_replay_ordering_event(update_stream: "torch.npu.Stream") -> None:+    """Make `update_stream` wait until the last recorded ordering marker."""+    if _replay_ordering_event is not None:+        update_stream.wait_event(_replay_ordering_event)+  def _is_stream_resource_capture_error(exc: RuntimeError) -> bool:     message = str(exc)@@ -244,8 +269,12 @@ class ACLGraphWrapper:         # In async scheduling or multi-threaded (MT) scenarios, it is possible that         # the CPU's record event (from update_attn_params) for the iteration i completes         # before the grph replay of iteration i-1.-        # To ensure proper ordering, we must call synchronize here before replaying,-        # so that update_attn_params only executes after the previous graph replay has fully completed.+        # To ensure proper ordering, the parameter update of iteration i must only+        # execute after the graph replay of iteration i-1 has fully completed.+        # Instead of stalling the host with a full stream synchronize, record an+        # ordering marker here (before this replay is enqueued); the update stream+        # waits on it device-side in update_full_graph_params, so the CPU can run+        # ahead while the device keeps the required update-after-replay order.         # If we do not in main model and in full-graph mode when using merge-eagle-graph,         # we do not need to synchronize.         # When enable_enpu is on, model_runner orders update vs replay; skip here.@@ -253,7 +282,7 @@ class ACLGraphWrapper:         is_draft_eagle = _EXTRA_CTX.is_draft_model and self.use_eagle         need_sync = self.runtime_mode == CUDAGraphMode.FULL and not is_draft_eagle         if not self.enable_enpu and need_sync:-            torch.npu.current_stream().synchronize()+            record_replay_ordering_event()         entry.aclgraph.replay()         return entry.output @@ -278,6 +307,11 @@ def update_full_graph_params(     draft_attn_metadatas=None, ):     impl_cls = attn_backend.get_impl_cls()+    # Order the parameter update after the previously enqueued replay without+    # blocking the host. The marker is recorded on the main stream right+    # before the replay enqueue (see ACLGraphWrapper), so it only fires once+    # all prior work -- including the previous replay -- has completed.+    wait_replay_ordering_event(update_stream)     impl_cls.update_graph_params(         update_stream,         forward_context,diff --git a/vllm_ascend/ops/rotary_embedding.py b/vllm_ascend/ops/rotary_embedding.pyindex 62e6873cbd5d4cceb9bd425662c999bf3b6338cd..f62d44731322b9a035a62cc19515a16d6c3d98f1 100644--- a/vllm_ascend/ops/rotary_embedding.py+++ b/vllm_ascend/ops/rotary_embedding.py@@ -57,6 +57,19 @@ _cos: torch.Tensor = None _sin: torch.Tensor = None _cos_slice: torch.Tensor = None _sin_slice: torch.Tensor = None+# Whether any consumer of `get_cos_and_sin_slice()` is active in this process+# (currently only the MiniMax-M2 fused attention patch). When False,+# `update_cos_sin()` skips the per-step gather/repeat into `_cos`/`_sin`,+# which is pure dead work for models (e.g. Qwen3 dense) whose rope path reads+# `cos_sin_cache` directly. The 310P runner calls `update_cos_sin()` itself,+# so it is unaffected by this flag.+_cos_sin_slice_required: bool = False+++def require_cos_sin_slice() -> None:+    """Mark that the loaded model consumes `get_cos_and_sin_slice()`."""+    global _cos_sin_slice_required+    _cos_sin_slice_required = True   def set_cos_and_sin(vllm_config, max_num_reqs, decode_token_per_req, dtype, device):@@ -132,6 +145,9 @@ def update_cos_sin(positions):     global _cos_slice     global _sin_slice +    if not _cos_sin_slice_required:+        return+     if _cos_sin_cache is None or _cos is None or _sin is None:         return diff --git a/vllm_ascend/worker/model_runner_v1.py b/vllm_ascend/worker/model_runner_v1.pyindex 70ef1d79a8d52d79b9d808f16257d39951a3d48b..c5f588c8806a2db7877a1eb9cd0b2489df86378a 100644--- a/vllm_ascend/worker/model_runner_v1.py+++ b/vllm_ascend/worker/model_runner_v1.py@@ -126,7 +126,7 @@ from vllm_ascend.eplb.adaptor.vllm_adaptor import VllmEplbAdaptor from vllm_ascend.eplb.core.eplb_device_transfer_loader import D2DExpertWeightLoader from vllm_ascend.eplb.core.eplb_worker import EplbProcess from vllm_ascend.eplb.eplb_updator import EplbUpdator-from vllm_ascend.ops.rotary_embedding import set_cos_and_sin, update_cos_sin+from vllm_ascend.ops.rotary_embedding import require_cos_sin_slice, set_cos_and_sin, update_cos_sin from vllm_ascend.patch.worker.patch_draft_quarot import patch_load_weights from vllm_ascend.quantization.utils import enable_fa_quant from vllm_ascend.sample.sampler import AscendSampler@@ -498,6 +498,12 @@ class NPUModelRunner(GPUModelRunner):             self.is_kv_consumer = vllm_config.kv_transfer_config.is_kv_consumer          set_cos_and_sin(vllm_config, self.max_num_reqs, self.uniform_decode_query_len, self.dtype, self.device)+        if self.model_config.hf_config.model_type == "minimax_m2":+            # The MiniMax-M2 fused attention patch reads cos/sin through+            # `get_cos_and_sin_slice()`, so `update_cos_sin()` must keep+            # refreshing the slices every step. All other models read the+            # rope cache directly and skip that per-step work.+            require_cos_sin_slice()         set_mc2_tokens_capacity(vllm_config, self.max_num_reqs, self.uniform_decode_query_len)         set_mc2_mask(vllm_config, self.device)         # Compute potential_max_tokens once here; it is reused by the skip-allreducediff --git a/vllm_ascend/worker/utils.py b/vllm_ascend/worker/utils.pyindex 48f73b35296714b88e794469db358bb2c19b99c4..f15101bb9c4354c712df8a3d75fe48a170bab385 100644--- a/vllm_ascend/worker/utils.py+++ b/vllm_ascend/worker/utils.py@@ -13,9 +13,17 @@ from vllm_ascend.ops.triton.triton_utils import get_vectorcore_num   def copy_snapshot_to_gpu(buffer: CpuGpuBuffer) -> torch.Tensor:-    """Copy a pinned snapshot of a CPU buffer to its GPU buffer."""-    cpu_snapshot = buffer.cpu.clone().pin_memory()-    return buffer.gpu.copy_(cpu_snapshot, non_blocking=True)+    """Copy the CPU snapshot of a buffer to its GPU buffer asynchronously.++    ``CpuGpuBuffer.cpu`` is already allocated in pinned memory, so this is a+    true async H2D copy. The caller must not rewrite the CPU buffer until the+    copy has completed; ``NPUModelRunner`` guarantees this via the+    ``prepare_inputs_event`` protocol (``synchronize_input_prep``) that wraps+    the whole input-preparation region, mirroring upstream vLLM. The previous+    ``clone().pin_memory()`` snapshot duplicated that protection with an extra+    pageable clone plus a fresh pinned allocation on every call.+    """+    return buffer.gpu.copy_(buffer.cpu, non_blocking=True)   @triton.jitdiff --git a/vllm_ascend/worker/v2/model_runner.py b/vllm_ascend/worker/v2/model_runner.pyindex 5e1d5909ab305453d368f22fd73568f90e7e5aa1..1d55e2b93b67adc104587fc25b815efd9a8236e4 100644--- a/vllm_ascend/worker/v2/model_runner.py+++ b/vllm_ascend/worker/v2/model_runner.py@@ -45,7 +45,7 @@ from vllm_ascend.ascend_forward_context import (     set_mc2_mask,     set_mc2_tokens_capacity, )-from vllm_ascend.ops.rotary_embedding import set_cos_and_sin, update_cos_sin+from vllm_ascend.ops.rotary_embedding import require_cos_sin_slice, set_cos_and_sin, update_cos_sin from vllm_ascend.utils import set_weight_prefetch_method from vllm_ascend.worker.v2.aclgraph_utils import ModelAclGraphManager from vllm_ascend.worker.v2.attn_utils import build_attn_state@@ -125,6 +125,7 @@ class NPUModelRunner(GPUModelRunner):         # TODO: remove set_cos_and_sin (together with update_cos_sin) when mla can properly handle cos/sin internally         self.decode_query_len = self.num_speculative_steps + 1         set_cos_and_sin(vllm_config, self.max_num_reqs, self.decode_query_len, self.dtype, self.device)+        require_cos_sin_slice()         set_mc2_tokens_capacity(vllm_config, self.max_num_reqs, self.decode_query_len)         set_mc2_mask(vllm_config, self.device)