|
Uni20
Asynchronous tensor and runtime library.
|
This directory documents Uni20 async runtime behavior and dataflow reverse-mode AD.
It is designed for two use cases:
The docs are split into two groups:
| Group | Documents | Use this when |
|---|---|---|
| Primary (canonical) | getting_started.md, coroutines_primer.md, runtime_model.md, buffers_and_awaiters.md, storage.md, kernel_authoring.md, cookbook.md, exceptions_and_cancellation.md, schedulers.md, tbb_execution_primer.md, reverse_mode_ad.md, task_registry_debug.md, dag_debug_examples.md, quick_reference.md | you want current behavior and API usage |
| Supplemental (design/history) | scheduler_migration.md, tensor_lifetime_and_dispatch_draft.md, audit_legacy_docs.md | you need design rationale or migration context |
| Document | Purpose | Best For |
|---|---|---|
| `getting_started.md` | First runnable mental model and code patterns | New contributors |
| `coroutines_primer.md` | C++ coroutine background for this runtime | New contributors |
| `runtime_model.md` | Core semantics of Async<T>, epochs, ownership, ordering | Everyone |
| `buffers_and_awaiters.md` | Two-capability buffer model, await paths, proxies, and exact await behavior | Runtime and kernel authors |
| `storage.md` | Async value/alias kinds, shared ownership, assignment, and timeline rebinding | Tensor and runtime authors |
| `kernel_authoring.md` | All-async Tensor operation wrappers, lifetimes, alias checks, output preparation, and failures | Tensor operation authors |
| `cookbook.md` | Common kernel patterns and debugging recipes | New and experienced contributors |
| `exceptions_and_cancellation.md` | Exception hierarchy, sink routing, cancellation details | Runtime contributors |
| `schedulers.md` | DebugScheduler, TbbScheduler, TbbNumaScheduler behavior | Performance and integration work |
| `tbb_execution_primer.md` | oneTBB threads, arenas, concurrency, constraints, task groups, and resumable waits | TBB scheduler contributors |
| `scheduler_migration.md` | Typed admission, shared rescheduling, task domains, and scheduler-route migration | Async and CUDA runtime designers |
| `reverse_mode_ad.md` | Dataflow reverse-mode concepts and Var<T> behavior | AD contributors |
| `task_registry_debug.md` | Debug dumps, stacktraces, runtime controls | Debugging and test triage |
| `dag_debug_examples.md` | Graphviz DAG examples, including deadlock snapshots | Runtime debugging |
| `quick_reference.md` | Condensed API/error/env reference | Experienced developers and AI agents |
| `tensor_lifetime_and_dispatch_draft.md` | Background reasoning for owner-retaining Tensor aliases and async dispatch | Design history |
| `audit_legacy_docs.md` | Divergence report vs older docs | Migration and cleanup |
The Async Examples Index classifies every program and identifies deliberate failure paths. Frequently used examples are:
examples/async/async_buffer_semantics_example.cpp: read/write ownership, release ordering, cancellation, and exception routingexamples/async/async_buffer_await_paths_example.cpp: borrowed and owning value, storage, and consuming await pathsexamples/async/async_example.cpp: basic read/write and try_await(...)examples/async/async_ops_example.cpp: expression DAG composition and all(...)examples/async/async_tensor_matrix_product_example.cpp: all-async Tensor fixed-output GEMM, matrix-product overwrite, and updateexamples/async/async_tbb_matrix_product_batch_example.cpp: configurable parallel batch of async Tensor matrix products using TbbScheduler, with fp32, fp64, and configured fp128 precision plus presentation-layer reportingexamples/async/async_tbb_reduction_example.cpp: parallel scheduling with TbbSchedulerexamples/async/async_dag_deadlock_tbb_example.cpp: Graphviz snapshot of a deliberate TBB dataflow deadlockexamples/async/async_diagnostics_guide_example.cpp: presentation-layer guide to task-registry reports, Graphviz/xdot provenance, stacktrace capability, and output customizationexamples/async/async_coroutine_failure_example.cpp: structured exception propagation through two async writer boundaries, with automatic live task-registry reporting and optional Graphviz captureCanonical async documents record the intended runtime contract, tests encode selected behavior, and source records the current implementation. If they disagree, report and resolve the conflict rather than silently treating one as authoritative. This docs set is kept aligned to:
If semantics change, update docs in this folder in the same PR.
The following local drafts may still exist in some working trees but are intentionally not part of the tracked canonical docs set:
docs/async.mddocs/async_api.mddocs/async_design.mddocs/async_new.mddocs/Epoch.md