Skip to content

Commit 47ea903

Browse files
seungrokjclaude
andcommitted
Merge main; keep #5196's perf-changelog block at the tail [skip-sweep]
Resolve the inferencex-e2e/perf-changelog.yaml conflict by taking main's entries unchanged and appending this PR's block after them. 合并 main;将 #5196 的 perf-changelog 条目保留在文件末尾。 解决 inferencex-e2e/perf-changelog.yaml 冲突:main 的条目保持不变, 本 PR 的条目追加在其后。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 parents c36a9d7 + e763ea2 commit 47ea903

362 files changed

Lines changed: 817364 additions & 410426 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/codeowner-signoff-verify-prompt.md‎

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,9 @@ THE STANDARD: the draft must be served as it ships. The BASELINE is the served
635635
checkpoint's own draft head or draft weights, in the precision they are stored in,
636636
loaded by the pinned upstream image with its default handling and no draft-related
637637
settings from the submission. PASS when the effective draft precision matches that
638-
baseline. FAIL when the submission makes the draft cheaper than that baseline.
638+
baseline. FAIL when the submission makes the draft cheaper than that baseline. The
639+
draft KV-cache dtype is judged only by the DRAFT KV-CACHE RULE below, not by this
640+
baseline comparison.
639641

640642
EXPLICIT PROHIBITION: `SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE` must not be enabled
641643
going forward. FAIL Check 13 if the effective recipe enables it (`=1` or any
@@ -671,9 +673,31 @@ because they predate the rule.
671673
computation faster without lowering weight or activation precision below what ships
672674
(fused or default lower-precision kernels for that model, scheduling) are allowed.
673675

676+
DRAFT KV-CACHE RULE: besides the framework's default draft KV-cache dtype, the storage
677+
dtype of the draft's own KV cache may be `bf16`, `fp16`, `fp32`, `fp8`, `fp8_e4m3`, or
678+
`fp8_e5m2` (or the pinned framework's spelling), even below the framework default or
679+
different from the target KV-cache dtype, only when (1) it is set through launch flags
680+
or engine config fields documented by the pinned image, not checkpoint-file edits,
681+
patches, or undocumented environment variables; (2) for golden/synthetic-acceptance
682+
runs, the golden AL identity used for that run in
683+
`inferencex-e2e/infx/golden_al_distribution/identities.yaml` records the same
684+
`draft_kv_cache_dtype` (a condition checked from the committed file, not an AL-based
685+
exemption); and (3) it changes only the draft KV storage dtype and the attention-input
686+
cast the pinned framework applies automatically to read it, not draft weight,
687+
activation, or GEMM precision or how the draft reads the target's KV pool (ATOM
688+
DeepSeek-V4.1 `DSparkConfig.draft_kv_dtype=fp8`, MXFP8 with OPUS A8W8, is NOT covered).
689+
Any other draft KV-cache dtype (`int8`, `int4`, `fp8_per_token_head`, MXFP8, FP4,
690+
NVFP4, MXFP4, ...) is allowed only as the framework default. For each affected
691+
configuration, report the effective draft KV-cache dtype, the framework default, and,
692+
for synthetic-acceptance runs, the golden identity key and its `draft_kv_cache_dtype`.
693+
PASS this aspect with that note when allowed; FAIL when a non-default draft KV-cache
694+
dtype is outside the list or does not match the golden identity; WARN when the
695+
effective value or identity cannot be resolved.
696+
674697
FAIL when the submission lowers draft precision below the baseline: online or offline
675-
quantization of draft weights, activations, or computation; dtype or KV-cache dtype
676-
overrides aimed at the draft that go below the framework default; substituting a
698+
quantization of draft weights, activations, or computation; weight, activation, or
699+
compute dtype overrides aimed at the draft that go below the framework default; a
700+
draft KV-cache dtype that the DRAFT KV-CACHE RULE does not allow; substituting a
677701
precision-converted or differently quantized draft checkpoint, or a head from a
678702
different release than the target; patching the pinned image so the draft loads or
679703
computes at a different precision than it does by default (an engine-patch waiver does
@@ -702,7 +726,8 @@ its separate speculative-algorithm/configuration requirements.
702726
`SGLANG_GLM_NEXTN_MOE_PTPC=1`. These are inspection leads, not a string denylist:
703727
resolve variables and inherited defaults, and determine whether the effective path
704728
lowers draft precision below the baseline. A draft path or an explicit setting that
705-
restates the default is not a violation; an omitted flag alone is not proof of
729+
restates the default is not a violation, and neither is a draft KV-cache dtype
730+
allowed by the DRAFT KV-CACHE RULE; an omitted flag alone is not proof of
706731
compliance.
707732
- Inspect generic online-quantization configs too, even when their flag names do not
708733
mention draft models. For ATOM's `--online_quant_config` (space or `=` form),
@@ -742,7 +767,8 @@ its separate speculative-algorithm/configuration requirements.
742767
a claimed unchanged AL, or a new AL measurement does not override this rule.
743768
Golden/synthetic AgentX acceptance (Check 11) does not demonstrate preserved draft
744769
precision and cannot excuse lowering it.
745-
- PASS only when the effective draft path is verified to match the shipped baseline.
770+
- PASS only when the effective draft path is verified to match the shipped baseline,
771+
apart from a draft KV-cache dtype allowed by the DRAFT KV-CACHE RULE.
746772
If evidence is missing or inaccessible, WARN as "Draft precision could not be
747773
verified", naming the missing evidence and requesting human review; do not
748774
assert that a precision change was proven or report PASS. This includes an

‎.github/workflows/benchmark-multinode-tmpl.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,14 @@ env:
153153
KV_OFFLOAD_BACKEND_METADATA: ${{ inputs.scenario-type == 'agentic-coding' && fromJSON(inputs.config)['kv-offload-backend'] && toJSON(fromJSON(inputs.config)['kv-offload-backend']) || '' }}
154154
ROUTER_METADATA: ${{ fromJSON(inputs.config).router && toJSON(fromJSON(inputs.config).router) || '' }}
155155
KV_P2P_TRANSFER: ${{ fromJSON(inputs.config)['kv-p2p-transfer'] || '' }}
156-
TOTAL_CPU_DRAM_GB: ${{ fromJSON(inputs.config)['total-cpu-dram-gb'] || '0' }}
157-
DECODE_CPU_DRAM_GB: ${{ fromJSON(inputs.config)['decode-cpu-dram-gb'] || '0' }}
158156
PYTHONDONTWRITEBYTECODE: '1'
159157
PYTHONPYCACHEPREFIX: /tmp/inferencex-pycache
160158
NODE_COUNT: ${{ inputs.node-count }}
161159
BENCHMARK_REF: ${{ inputs.ref || github.sha }}
162160
PR_NUMBER: ${{ inputs.pr-number }}
163161
TEST_NAME: ${{ inputs.test-name }}
164162

163+
PREFILL_GPUS_PER_WORKER: ${{ fromJSON(inputs.config).prefill['gpus-per-worker'] }}
165164
PREFILL_NUM_WORKERS: ${{ fromJSON(inputs.config).prefill.num-worker }}
166165
PREFILL_TP: ${{ fromJSON(inputs.config).prefill.tp }}
167166
PREFILL_PP_SIZE: ${{ fromJSON(inputs.config).prefill.pp }}
@@ -172,6 +171,7 @@ env:
172171
PREFILL_EP: ${{ fromJSON(inputs.config).prefill.ep }}
173172
PREFILL_DP_ATTN: ${{ fromJSON(inputs.config).prefill.dp-attn }}
174173

174+
DECODE_GPUS_PER_WORKER: ${{ fromJSON(inputs.config).decode['gpus-per-worker'] }}
175175
DECODE_NUM_WORKERS: ${{ fromJSON(inputs.config).decode.num-worker }}
176176
DECODE_TP: ${{ fromJSON(inputs.config).decode.tp }}
177177
DECODE_PP_SIZE: ${{ fromJSON(inputs.config).decode.pp }}

‎.github/workflows/benchmark-tmpl.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ env:
117117
IMAGE: ${{ fromJSON(inputs.config).image }}
118118
FRAMEWORK: ${{ fromJSON(inputs.config).framework }}
119119
PRECISION: ${{ fromJSON(inputs.config).precision }}
120+
GPU_COUNT: ${{ fromJSON(inputs.config)['gpus-per-worker'] }}
120121
TP: ${{ fromJSON(inputs.config).tp }}
121122
PP_SIZE: ${{ fromJSON(inputs.config).pp }}
122123
DCP_SIZE: ${{ fromJSON(inputs.config).dcp-size }}
@@ -137,7 +138,6 @@ env:
137138
KV_OFFLOAD_BACKEND_METADATA: ${{ inputs.scenario-type == 'agentic-coding' && fromJSON(inputs.config).kv-offload-backend && toJSON(fromJSON(inputs.config).kv-offload-backend) || '' }}
138139
ROUTER_METADATA: ${{ fromJSON(inputs.config).router && toJSON(fromJSON(inputs.config).router) || '' }}
139140
KV_P2P_TRANSFER: ${{ fromJSON(inputs.config).kv-p2p-transfer || '' }}
140-
TOTAL_CPU_DRAM_GB: ${{ fromJSON(inputs.config).total-cpu-dram-gb || '0' }}
141141
DURATION: ${{ inputs.duration }}
142142
AIPERF_EXPERIMENTAL_FAST: ${{ inputs.agentx-fast && '1' || '0' }}
143143
EVAL_LIMIT: ${{ inputs.eval-limit }}
@@ -290,10 +290,8 @@ jobs:
290290
export GPU_COUNT="$VIDEO_GPUS"
291291
export CONC_LIST="$VIDEO_CONC_LIST"
292292
echo "CONC_LIST=${CONC_LIST}" >> "$GITHUB_ENV"
293-
else
294-
export GPU_COUNT=$((TP * PP_SIZE * PCP_SIZE))
293+
echo "GPU_COUNT=${GPU_COUNT}" >> "$GITHUB_ENV"
295294
fi
296-
echo "GPU_COUNT=${GPU_COUNT}" >> "$GITHUB_ENV"
297295
298296
echo "RESULT_FILENAME=${RESULT_FILENAME}" >> "$GITHUB_ENV"
299297

‎.github/workflows/operatorx-sweep.yml‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ on:
1515
- cluster:gb200-nv
1616
- cluster:gb300-nv
1717
- cluster:mi300x-amd
18-
- cluster:mi325x-amds
18+
- cluster:mi325x-amd
1919
- cluster:mi355x-amds
2020
backends:
2121
description: Comma-separated backends (vllm GEMM; AMD also torch GEMM)
2222
type: string
2323
default: vllm
2424
testlists:
25-
description: Comma-separated testlist stems
25+
description: Comma-separated testlist stems (a run is ingested only if every list is in testlists/official/)
2626
type: string
27-
default: gemm
27+
default: gemm_perf
2828
mode:
2929
description: timing (latency, telemetry, profiler replay) or counters (per-kernel ncu / rocprofv3 counters; latencies perturbed)
3030
type: choice
@@ -35,9 +35,9 @@ on:
3535
type: string
3636
default: '1'
3737
chunk_size:
38-
description: Maximum shapes per shard (1-500)
38+
description: Maximum shapes per shard (1-4000; shards also stop at about 30 min of estimated work)
3939
type: number
40-
default: 500
40+
default: 4000
4141
recovery_run_id:
4242
description: Optional recent OperatorX run on this runner whose failed cleanup should be retried
4343
type: string
@@ -69,6 +69,7 @@ jobs:
6969
timeout-minutes: 10
7070
outputs:
7171
matrix: ${{ steps.plan.outputs.matrix }}
72+
ingestable: ${{ steps.plan.outputs.ingestable }}
7273
steps:
7374
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7475
with:
@@ -79,11 +80,11 @@ jobs:
7980
env:
8081
OPERATORX_RUNNER: ${{ inputs.runner || 'cluster:h100-dsxe' }}
8182
OPERATORX_BACKENDS: ${{ inputs.backends || 'vllm' }}
82-
OPERATORX_TESTLISTS: ${{ inputs.testlists || 'gemm' }}
83+
OPERATORX_TESTLISTS: ${{ inputs.testlists || 'gemm_perf' }}
8384
OPERATORX_WORLD_SIZES: ${{ inputs.world_sizes || '1' }}
8485
OPERATORX_MODE: ${{ inputs.mode || 'timing' }}
8586
OPERATORX_RECOVERY_RUN: ${{ inputs.recovery_run_id }}
86-
OPERATORX_CHUNK_SIZE: ${{ github.event_name == 'workflow_dispatch' && format('{0}', inputs.chunk_size) || '500' }}
87+
OPERATORX_CHUNK_SIZE: ${{ github.event_name == 'workflow_dispatch' && format('{0}', inputs.chunk_size) || '4000' }}
8788
PYTHONPATH: .:inferencex-e2e
8889
run: |
8990
set -eo pipefail
@@ -109,6 +110,16 @@ jobs:
109110
--queue-namespace "${GITHUB_RUN_ID}:${GITHUB_RUN_ATTEMPT}" \
110111
--facts-file "${RUNNER_TEMP}/scheduling-facts.json" > annotated.json
111112
echo "matrix=$(jq -c '{include: .}' annotated.json)" >> "$GITHUB_OUTPUT"
113+
# only runs whose every testlist is in testlists/official/ are ingested
114+
ingestable=true
115+
IFS=, read -ra lists <<<"$OPERATORX_TESTLISTS"
116+
for t in "${lists[@]}"; do
117+
if [ ! -f "operatorx/testlists/official/$t.json" ]; then
118+
ingestable=false
119+
echo "::notice::$t is not an official testlist; this run's results will not be ingested"
120+
fi
121+
done
122+
echo "ingestable=$ingestable" >> "$GITHUB_OUTPUT"
112123
- name: Upload scheduling facts
113124
if: vars.PRIORITY_SCHEDULER_ENABLED == 'true'
114125
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -264,9 +275,10 @@ jobs:
264275
trigger-ingest:
265276
name: Trigger OperatorX database ingest
266277
if: >-
267-
always() && github.event_name == 'workflow_dispatch' && inputs.ingest &&
278+
!cancelled() && github.event_name == 'workflow_dispatch' && inputs.ingest &&
279+
needs.setup.outputs.ingestable == 'true' &&
268280
(needs.summarize.result == 'success' || needs.summarize.result == 'failure')
269-
needs: [summarize]
281+
needs: [setup, summarize]
270282
runs-on: ubuntu-latest
271283
steps:
272284
- name: Dispatch ingest to the app repository

‎.github/workflows/profile.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ jobs:
220220
IMAGE: ${{ matrix.config.image }}
221221
FRAMEWORK: ${{ matrix.config.framework }}
222222
PRECISION: ${{ matrix.config.precision }}
223+
GPU_COUNT: ${{ matrix.config['gpus-per-worker'] }}
223224
TP: ${{ matrix.config.tp }}
224225
PP_SIZE: ${{ matrix.config.pp }}
225226
DCP_SIZE: ${{ matrix.config.dcp-size }}
@@ -329,8 +330,6 @@ jobs:
329330
export GITHUB_WORKSPACE="$PWD"
330331
echo "INFERENCEX_E2E_ROOT=$PWD" >> "$GITHUB_ENV"
331332
set -eo pipefail
332-
export GPU_COUNT=$((TP * PP_SIZE * PCP_SIZE))
333-
echo "GPU_COUNT=${GPU_COUNT}" >> "$GITHUB_ENV"
334333
ep_val="${EP_SIZE:-1}"
335334
res_name="${EXP_NAME}_${PRECISION}_${FRAMEWORK}_tp${TP}-pp${PP_SIZE}-dcp${DCP_SIZE}-pcp${PCP_SIZE}_ep${ep_val}_dpa_${DP_ATTENTION}_conc${CONC}_${RUNNER_NAME}"
336335
export RESULT_FILENAME="${res_name}"

‎CONTRIBUTING.md‎

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ what the pinned upstream image does with it out of the box. The baseline is the
4949
same checkpoint loaded by the same pinned image with no draft-related settings from
5050
the submission. A submission is compliant when its effective draft precision matches
5151
that baseline. It is not compliant when it makes the draft cheaper than that baseline.
52+
The draft KV-cache dtype is judged only by the draft KV-cache rule below, not by this
53+
baseline comparison.
5254

5355
Allowed (this is the baseline, not an exception):
5456

@@ -72,6 +74,30 @@ Allowed (this is the baseline, not an exception):
7274
the same draft computation faster without lowering the precision of its weights or
7375
activations below what ships.
7476

77+
Draft KV-cache dtype rule. Besides the framework's default draft KV-cache dtype for
78+
that checkpoint (allowed above), a submission may set the storage dtype of the draft's
79+
own KV cache to `bf16`, `fp16`, `fp32`, `fp8`, `fp8_e4m3`, or `fp8_e5m2` (or the
80+
pinned framework's spelling of these), even when it is below the framework default or
81+
differs from the target KV-cache dtype, only if all of the following hold:
82+
83+
- It is set through launch flags or engine config fields documented by the pinned
84+
image (CLI flags, `--speculative-config` JSON, srt-slurm recipe YAML), not through
85+
checkpoint-file edits, patches, or undocumented environment variables.
86+
- For runs that use golden/synthetic acceptance, the golden AL identity used for that
87+
run in `inferencex-e2e/infx/golden_al_distribution/identities.yaml` records the same
88+
`draft_kv_cache_dtype`. This is a condition of the rule, checked from the committed
89+
file, not an AL-based exemption.
90+
- It changes only the draft KV storage dtype and the attention-input cast the pinned
91+
framework applies automatically to read that dtype (for example an FP8 query for
92+
FP8-KV attention). It does not allow any other quantization of draft weights,
93+
activations, or GEMMs, or settings that change how the draft reads the target's KV
94+
pool or enable quantized draft attention compute (for example ATOM DeepSeek-V4.1
95+
`DSparkConfig.draft_kv_dtype=fp8`, which reads MXFP8 windows with OPUS A8W8).
96+
97+
Any other draft KV-cache dtype (for example `int8`, `int4`, `fp8_per_token_head`,
98+
MXFP8, FP4, NVFP4, MXFP4) is allowed only when it is the framework's default for that
99+
checkpoint. This rule does not change eval requirements.
100+
75101
Forbidden (submission-side precision hacking of the draft):
76102

77103
- Enabling `SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE` (`=1` or any other enabling
@@ -89,7 +115,7 @@ Forbidden (submission-side precision hacking of the draft):
89115
applied to a BF16 MTP head, `SGLANG_GLM_NEXTN_MOE_PTPC=1`, and an ATOM
90116
`--online_quant_config` whose `exclude_layer` patterns do not cover the entire draft
91117
head.
92-
- Dtype overrides aimed at the draft that lower its precision below the framework's default for that checkpoint.
118+
- Weight, activation, or compute dtype overrides aimed at the draft that lower its precision below the framework's default for that checkpoint, and draft KV-cache dtypes that the draft KV-cache rule above does not allow.
93119
- Substituting a precision-converted or differently quantized draft checkpoint, or a
94120
draft head taken from a different release than the served target.
95121
- Patching the pinned image so that it loads or computes the draft at a different
@@ -116,7 +142,10 @@ name or precision label.
116142
For speculative-decoding changes, the CODEOWNER's additional detail section must
117143
identify the draft checkpoint/revision (or embedded head), the precision it ships in,
118144
how the pinned upstream image handles it by default, and its effective serving
119-
precision, so the reviewer can confirm the last two match. If evidence is missing
145+
precision, including the effective draft KV-cache dtype per configuration and, for
146+
synthetic-acceptance runs, the golden AL identity used, so the reviewer can confirm
147+
the last two match apart from a draft KV-cache dtype allowed by the draft KV-cache
148+
rule. If evidence is missing
120149
or inaccessible, record the uncertainty and missing evidence instead of claiming
121150
verification. Check 13 reports WARN and requests human review; this does not
122151
establish compliance or grant an exception. A demonstrated precision violation or

‎collectivex/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ result file per case into `results/` on the cluster that ran it. A second suite,
66
[vLLM `swap_blocks` benchmark](docs/swap-blocks.md), measures pinned CPU↔GPU and same-GPU block
77
copies through the same matrix and pool launchers.
88

9+
The intent is to benchmark what production does: each library runs the configuration a serving
10+
engine selects for it, with no tuning sweep. Configurations no engine can select today (UCCL-EP,
11+
NCCL EP `normal` mode and NCCL EP FP8) still run, as library rows labelled `candidate`. The intent
12+
covers configuration only: the workload is synthetic, with no expert compute and uniform routing.
13+
914
CollectiveX runs through the [CollectiveX Sweep](#running-in-ci) workflow or by hand on each pool
1015
(see [Running By Hand](#running-by-hand)). Uploading the
1116
results to the CollectiveX database is the publish step: the dashboard shows the latest stored run.

‎collectivex/docs/methodology.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ sends each token to the ranks owning its top-k experts, and **combine** brings t
88
back. No expert compute runs, so it measures neither overlap nor serving throughput, and it does not
99
rank or recommend.
1010

11+
**Intent: benchmark what production does.** Each library runs the configuration a serving engine
12+
selects for it. Configurations no engine can select today (UCCL-EP, NCCL EP `normal` mode and NCCL
13+
EP FP8) still run, as library rows labelled `candidate`. The intent covers configuration only: the
14+
workload is synthetic.
15+
1116
- **Shape** `deepseek-v4-pro`: hidden 7168, top-k 6, 384 experts, packed placement, uniform
1217
deterministic routing, proven identical on every rank.
1318
- **`T` is tokens per rank**: decode 1-512, prefill 1024-8192, powers of two.

0 commit comments

Comments
 (0)