oxicuda_graph/optimizer/mod.rs
1//! Optimisation passes for the OxiCUDA computation graph.
2//!
3//! Three complementary passes transform a validated [`ComputeGraph`] into
4//! a form ready for execution:
5//!
6//! * [`fusion`] — Identifies chains of element-wise kernels that can be
7//! merged into a single PTX kernel, reducing kernel-launch overhead and
8//! improving cache behaviour.
9//!
10//! * [`memory`] — Assigns device memory slots to logical buffers using
11//! live-interval graph colouring, maximising buffer reuse and minimising
12//! peak device memory usage.
13//!
14//! * [`stream`] — Partitions independent nodes onto separate CUDA streams
15//! for concurrent GPU execution, and identifies the cross-stream event
16//! synchronisation points needed to enforce dependencies.
17//!
18//! [`ComputeGraph`]: crate::graph::ComputeGraph
19
20pub mod fusion;
21pub mod memory;
22pub mod stream;
23
24pub use fusion::{FusionGroup, FusionPlan, analyse as fusion_analyse};
25pub use memory::{MemoryPlan, SlotAssignment, analyse as memory_analyse};
26pub use stream::{StreamPlan, SyncPoint, analyse as stream_analyse};