1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # atomr-accel-cuda
//!
//! GPU acceleration via the actor model. Wraps NVIDIA CUDA libraries as
//! actors on top of [`atomr`](../atomr). See `README.md` and the
//! architecture document under `docs/` for the full design.
//!
//! ## Foundation Phase F1 (current)
//!
//! - Two-tier supervision: [`device::DeviceActor`] (stable address) ↔
//! [`device::ContextActor`] (owns `Arc<CudaContext>`, restartable).
//! - [`gpu_ref::GpuRef`] with generation-token validity checks.
//! - [`dispatcher::GpuDispatcher`] pinning actor execution to a single
//! OS thread.
//! - [`completion::HostFnCompletion`] for sub-microsecond stream
//! completion via `cuLaunchHostFunc`.
//! - [`stream::PerActorAllocator`] as the default §5.7 strategy.
//! - [`kernel::BlasActor`] performing cuBLAS SGEMM as the canonical
//! demo.
//!
//! Phases F2–F5 (cuDNN, cuFFT, NCCL, TensorRT, the `PythonGpuBridge`)
//! and the four blueprint sub-crates are deferred.
// Subjective clippy lints that fight the actor-message design:
// * `type_complexity` — actor messages and kernel envelopes return
// tuples of typed `Arc<CudaSlice<T>>` keep-alives; refactoring to
// `type` aliases would worsen the public API.
// * `too_many_arguments` — kernel-launcher fns mirror the underlying
// CUDA library entry points (cuDNN conv, cuSPARSE SpMV) which take
// 8–10 args; collapsing to a config struct just moves the fields.
// * `arc_with_non_send_sync` — CUDA driver handles (CudaGraph,
// cudnnHandle) are `!Send` by design and only ever shared inside
// the producing actor.
// * `large_enum_variant` — kernel-message enums have one large
// conv-descriptor variant; boxing it would fragment the hot path.