Repository navigation
feat: bound pending native execution work - #82
hsliuustc0106 wants to merge 3 commits into
Conversation
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
…admission Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
|
CPU review at [P3] Keep the raw measurement archive as a durable external evidence asset. Personally run: Review scope and provenance
|
|
The next integration step has changed since the earlier review: #149 has landed, and current runtime already provides Before resolving this draft’s conflicts, please narrow the delta to the Cua/Open-Jev policy and integration that remain needed. State precisely whether “pending” counts complete requests or model execution units (Cua admits one question, Open-Jev a complete request), and reuse the landed runtime primitives where their semantics fit. Preserve capacity ownership through detached blocking work after timeout/disconnect, and cover full-capacity refusal, cancellation and permit release in the resolved tree. The earlier archive-hygiene suggestion also remains: retain the raw measurements/checksums/recomputation path as durable evidence. Keep historical GPU A/B results pinned to their measured head; describe the executable delta after integration and rerun the impacted admission/latency measurements if that behavior changes. A storage-only move does not itself require repeating the GPU campaign. Please update the self-review evidence and draft readiness after current-head CI/CPU coverage is available. This follow-up is at unchanged head Agent-assisted readiness follow-up using the repository review skill pinned at trusted main |
Purpose
The shared serial scheduler previously allowed unlimited pending execution units. Bound waiting and dispatched units together (64 per loaded executor by default), configured with
OMNI_NATIVE_MAX_PENDING. Full capacity immediately returns a typed overload error without dispatch; both native workers map it to HTTP 503 using their existingdetail/errorresponse shape.Cancelling queued work returns capacity; dispatched work retains both permits and captured model resources until completion. FIFO execution remains serial. Cua-S1 counts individual question forwards, so a later overload fails the whole request without partial answers; Open-Jev counts complete requests. This bounds execution units, not ingress or prepared-token memory.
Update runtime/architecture/model contracts, recipes, frontend documentation and contributor/review skills. Add shared CPU tests and preserved actual-run evidence. Token budgets and batch-capable execution remain later work.
Test Plan
System1-Omni Version / Commit: PR head
2321c0dbb53b3dbfed1fef52ef12e57f1226b7b0against current maine3cb4a215d76e5df929f60e71552531408f95c72. Runtime measured atb5c443c9310f2118289500b6088822e7bba1fb72against merged PR809adb0701132d259a9fcc8a559472f1c3dc5590b0; all Rust sources, Cargo manifests/lockfile and CUDA build inputs are identical between measured and final heads. Upstream docs/recipes were integrated afterward.cargo fmt --all --checkcargo clippy --workspace --locked --all-targets -j 16 -- -D warningscargo test --workspace --locked -j 16cargo build --workspace --release --locked -j 16mkdocs build --strict, changed-link checks and skill validation.python benchmarks/bench.py validate benchmarks/smoke.jsonlpython -m unittest discover -s tests/benchmarks -p 'test_*.py' -vTest Result
GitHub CI passed on the integrated head: Rust, benchmark tests and Docs build (deployment skipped for pull requests). All local checks passed: 59 workspace tests, nine existing opt-in/resource-dependent cases ignored, eight benchmark tests, strict docs, 96 links and all four updated skills. Scheduler coverage checks full-capacity rejection without dispatch, FIFO order, queued cancellation returning capacity, dispatched cancellation retaining capacity/resources, error/panic release, independent loaded executors and recovery. Native tests cover startup configuration and overload versus ordinary inference-error HTTP bodies.
Fresh GPU A/B: 1,536 measured requests and 256 excluded feasibility, zero measured failures, exact response/key-order parity except Jev timing metadata, and all six regression gates passed. In each limit-one burst, one request returned 200 and seven returned the expected 503; recovery returned 200 with exact parity and healthy readiness. All 40 task processes exited and the reservation was released.
Gates were predeclared: mean of per-run mean latency ≤105% baseline, mean requests/s ≥95%, mean per-run p95 ≤110%. These are observed results from two repetitions per setting, not statistically proven equivalence or a speed claim. Metal, CUDA Graphs and full frontend performance were not measured. The nine ignored default-suite cases (six CUDA kernel references, two Laya checkpoint cases and one pinned Jev tokenizer case) were not run separately; no kernel/tokenizer changes are included.
Demo / evidence
Actual-run report, frozen protocol and source/input hashes, and compressed raw records. The report contains both repetitions' variation, process-to-readiness and first-inference results, and memory sampled every 200ms, including near-limit validation. The archive includes all measured/feasibility responses, warmups, first/near-limit/error cases, overload/recovery records, byte-exact synthetic inputs and six raw device-memory sample logs.
Controls: exact reserved GPU5 (SM90 NVIDIA L20X), NUMA1/CPUs56–71, driver 570.133.20, CUDA driver API13000, Rust1.98.1, pinned Cua-S1/Open-Jev checkpoints, BF16 backbone with existing FP32 CPU heads/f64 normalization, unchanged CUDA ABI4 library, eager CUDA and 16 Tokio workers. Models, precision, source/library hashes, prepared-environment requirements, input shapes/lengths, budget and reproduction commands are in the linked protocol/report. Startup, warmups and preparation are excluded from measured replay. Baseline binaries reuse an isolated build whose entire tree equals merged main; measurements of both configurations are fresh.
This is synthetic regression evidence, not model accuracy or a general serving-capacity benchmark. Video and labelled accuracy are N/A for this backend admission change. Public metadata removes machine-local identity/paths/process and reservation details; original response bodies and timing records are retained. No private/customer input or third-party visual assets are included. Full private originals and the launcher remain preserved locally.
Self-review
Agent-assisted precheck found no actionable issues in the complete diff and verified the final head's build-source equivalence to the measured candidate. Contributor and maintainer review remain pending.