Expand description
Optimisation passes for the OxiCUDA computation graph.
Three complementary passes transform a validated ComputeGraph into
a form ready for execution:
-
fusion— Identifies chains of element-wise kernels that can be merged into a single PTX kernel, reducing kernel-launch overhead and improving cache behaviour. -
fusion_reduction— Identifies reduction-chained element-wise regions (LayerNorm,softmax, …) — single-entry/single-exit broadcast diamonds that the linear chain fuser cannot capture — and collapses each into one fused kernel. -
memory— Assigns device memory slots to logical buffers using live-interval graph colouring, maximising buffer reuse and minimising peak device memory usage. -
stream— Partitions independent nodes onto separate CUDA streams for concurrent GPU execution, and identifies the cross-stream event synchronisation points needed to enforce dependencies.
Re-exports§
pub use fusion::FusionGroup;pub use fusion::FusionPlan;pub use fusion::analyse as fusion_analyse;pub use fusion_reduction::ReductionFusionGroup;pub use fusion_reduction::ReductionFusionPlan;pub use fusion_reduction::ReductionPattern;pub use fusion_reduction::analyse as reduction_fusion_analyse;pub use fusion_reduction::rewrite as reduction_fusion_rewrite;pub use memory::MemoryPlan;pub use memory::SlotAssignment;pub use memory::analyse as memory_analyse;pub use stream::StreamPlan;pub use stream::SyncPoint;pub use stream::analyse as stream_analyse;
Modules§
- fusion
- Operator fusion pass — merges chains of fusible element-wise kernels.
- fusion_
reduction - Reduction-pattern fusion pass — fuses reduction-chained element-wise
regions (
LayerNorm,softmax, …) that the linear element-wise fuser incrate::optimizer::fusioncannot capture. - memory
- Memory planning — buffer allocation via live-interval graph colouring.
- stream
- Stream partitioning — assigns nodes to independent CUDA streams.