Signed-off-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> Co-authored-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1.6 KiB
1.6 KiB
title, kind, status, owners, primary_code_paths, related_code_paths, depends_on, validation_paths, upstream_refs, last_reviewed
| title | kind | status | owners | primary_code_paths | related_code_paths | depends_on | validation_paths | upstream_refs | last_reviewed | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Diffusion Runtime | module | draft |
|
|
|
|
|
|
2026-07-16 |
Diffusion runtime
The diffusion runtime owns request admission, scheduling, execution, progress, output, cancellation, and cleanup inside a diffusion stage.
Candidate invariants
DIFF-RUNTIME-INV-001: One lifecycle owner
Rule: Every admitted request MUST have exactly one scheduler-owned lifecycle until completion, cancellation, or failure.
DIFF-RUNTIME-INV-002: Execution follows scheduler output
Rule: Executors and workers MUST execute scheduler decisions without admitting, reordering, or forwarding requests independently.
DIFF-RUNTIME-INV-003: Terminal cleanup is complete
Rule: Every terminal path MUST release request state, temporary tensors, hooks, and runtime-owned resources.
DIFF-RUNTIME-INV-004: Optional features use runtime hooks
Rule: Cache, profiling, offload, and parallel features SHOULD integrate at defined hooks instead of creating another request lifecycle.
Safe-change guide
Test success, cancellation, failure, shutdown, multiple requests, and resource cleanup.