Skip to content

CI: run the NPU-free tests on every PR - #20

Merged
gspark-etri merged 1 commit into
mainfrom
ci/npu-free-tests
Oct 22, 2026
Merged

gspark-etri merged 1 commit into
mainfrom
ci/npu-free-tests

Conversation

@gspark-etri

Copy link
Copy Markdown
Contributor

Background

The repository had no CI, so PRs had no checks to wait for and the NPU-free tests ran only by hand (#19). Needed now by #18 and the delta-load PRs for #17.

Changes

Verification

Compatibility and limits

  • Workflow only, no code change.
  • Nothing that needs an NPU SDK (furiosa, rebel, vllm) runs here; those tests stay on the NPU node.

Related Issue

Closes #19. Part of #17.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gspark-etri
gspark-etri merged commit 1415842 into main Oct 22, 2026
1 check passed
@gspark-etri
gspark-etri deleted the ci/npu-free-tests branch October 22, 2026 09:57
gspark-etri added a commit that referenced this pull request Oct 22, 2026
#18)

## Background

#14 compares rngd-pd's own engine with furiosa-llm `serve` on one RNGD
card (Llama-3.1-8B). The earlier numbers came from two different
harnesses: `bench/sweep_vendor.jsonl` from `vendor_sweep.py`, and
`bench/rpt_sweep_S512.jsonl` through the non-streaming gateway. They
cannot be compared point for point. This PR is phase 1 of #14: one
harness, both engines, the same card type, and the gap table.

## Changes

- `bench/vendor_sweep.py` is now an engine-neutral client for any
OpenAI-style `/v1/completions` server:
- Prompts are exactly P token IDs, sent as a token-ID list, so both
servers see identical input. Each prompt starts with BOS and eight fresh
random tokens, so no prefix cache applies.
- Grid: P ∈ {128, 512, 1024, 2048} × concurrency ∈ {1, 2, 4, 8, 16}.
Each point runs 2 bursts of `concurrency` simultaneous requests, after
one untimed warm-up per P.
- Generation is greedy with `ignore_eos` and exactly `max_tokens` (64)
tokens.
- TTFT is measured from send to the first streamed token. TPOT is (last
− first) / (n − 1) per request. tok/s is generated tokens / burst wall
time. The harness also reports p50/p90, ITL p99, errors, and furiosa-smi
power and utilisation for the card in use.
- `--greedy N` records outputs for fixed prompts, for the token-equality
check in phase 3.
- `serving/cluster.py`: the one-card worker (`--role solo`) serves `POST
/v1/completions` itself, with SSE streaming, text or token-ID prompts,
`stream_options.include_usage`, and a 400 for prompts that do not fit.
The continuous scheduler hands each token to the caller as it is
produced (`_emit`). Other roles are unchanged.
- `bench/serve_sweep_job.sh` + `deploy/k8s/serve-sweep-job.yaml` run one
engine and the sweep in a Job:
  - The Job requests `furiosa.ai/rngd: 1` and sets a deadline and a TTL.
- It runs privileged because furiosa-torch cannot open the card
otherwise. The allocated card comes from the kubelet checkpoint
(`rngd_pd.devices`).
  - Outputs go to `~/rngd-perf-out`.
- `engines/prefill_full.py`: `prefill_graph_spec()` (key + build in one
place). `bench/prebake.py --prefill C[,C]` now bakes prefill widths
without a card.
- `bench/harness_report.py` prints the gap table from two runs.
- Data: `bench/harness_furiosa_llm.jsonl`,
`bench/harness_rngd_pd_phase1.jsonl`.

## Verification

- `PYTHONPATH=src python -m pytest -q tests/test_solo_openai.py
tests/test_continuous_backlog.py tests/test_devices.py` → 18 passed. CI
on the rebased branch: 51 passed (NPU-free set + these two files). The
new tests drive the real scheduler and HTTP handler with a fake engine
through `vendor_sweep.stream_once`. They check one chunk per token, text
and token-ID prompts, the 400 response, and concurrent streams.
- On npu-node-1, 2026-10-22. Each run was a Job in namespace `rngd-perf`
with one card, deleted after it finished.
- **furiosa-llm**: 2026.3.0 with the `llama8b-pfbatch` artifact (the one
behind `sweep_vendor.jsonl`). furiosa-llm 2026.4's CLI accepts only a
native `.fxb`, and no 8B `.fxb` with comparable buckets exists on the
node.
- **rngd-pd**: solo worker, B=16 continuous, furiosa-torch 2026.2.0,
prefill buckets 128…C. A worker has one context length S. S was chosen
per P the way furiosa-llm picks its decode bucket: S=1024 for P ≤ 512,
2048 for P = 1024, 4096 for P = 2048. The decode layer group was 8 at
S=1024 and 4 at S=2048/4096: group 8 at S ≥ 2048 (and at S=1152/2176)
fails to compile with `memory explosion` (UnsupportedOpError). New
graphs were baked on the host without a card.

| P | conc | TTFT ms furiosa-llm / rngd-pd | x | TPOT ms | x | tok/s | x
|
|--:|--:|--:|--:|--:|--:|--:|--:|
| 128 | 1 | 26.3 / 102.5 | 3.90 | 17.41 / 70.89 | 4.07 | 56.9 / 14.0 |
0.25 |
| 128 | 4 | 78.6 / 609.5 | 7.75 | 18.65 / 74.39 | 3.99 | 203.8 / 44.1 |
0.22 |
| 128 | 16 | 155.4 / 3197.2 | 20.6 | 21.73 / 82.99 | 3.82 | 651.4 / 92.4
| 0.14 |
| 512 | 1 | 51.6 / 134.9 | 2.61 | 17.71 / 70.77 | 4.00 | 54.8 / 13.9 |
0.25 |
| 512 | 16 | 453.9 / 3708.6 | 8.17 | 26.54 / 87.82 | 3.31 | 460.3 / 87.2
| 0.19 |
| 1024 | 1 | 98.5 / 177.6 | 1.80 | 17.89 / 102.59 | 5.73 | 52.2 / 9.6 |
0.18 |
| 1024 | 16 | 911.8 / 3665.6 | 4.02 | 32.90 / 85.21 | 2.59 | 321.7 /
87.3 | 0.27 |
| 2048 | 1 | 208.1 / 407.6 | 1.96 | 18.09 / 81.93 | 4.53 | 47.4 / 11.5 |
0.24 |
| 2048 | 16 | 1858.5 / 6444.9 | 3.47 | 45.21 / 129.13 | 2.86 | 201.2 /
57.9 | 0.29 |

All 20 points of each engine completed with 0 errors. The full table is
printed by `python bench/harness_report.py
bench/harness_furiosa_llm.jsonl bench/harness_rngd_pd_phase1.jsonl`.
rngd-pd misses the #14 target on every point. The largest gap is TPOT,
about 4× at every load, so a B=16 step costs ~70 ms where furiosa-llm's
costs ~17–22 ms. Phase 2 profiles why.

- To reproduce: bake the graphs (`RNGD_MAX_SHAPES=8 python
bench/prebake.py --B 16 --S 1024 --group 8`, `--prefill 1024,2048
--no-decode`, and so on), then apply the Job once per engine/S with
`ENGINE`, `S`, `C`, `RNGD_BUCKETS`, `CONTEXTS` and `DECODE_GROUP` set.

## Compatibility and limits

- `vendor_sweep.py` changes defaults: `max_tokens` 64 (was 16) and
`--out` is now required. TPOT is per-request (last − first)/(n − 1)
instead of the median gap, and utilisation is the mean instead of the
max, so its rows are not directly comparable with
`bench/sweep_vendor.jsonl`.
- The solo endpoint is greedy only, has no stop condition
(`finish_reason` is always `length`) and needs prompt + max_tokens ≤ S.
It refuses anything else with a 400.
- The Job is privileged and mounts the kubelet device-plugin checkpoint
read-only. It uses only the card allocated to it.
- CI (`ci.yml`, #20): this PR adds `tests/test_continuous_backlog.py`
and `tests/test_solo_openai.py` to the NPU-free set. The `tests` check
passed on the rebased branch (51 passed).

## Related Issue

Part of #14 (phase 1).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: run the NPU-free tests on every PR

1 participant