pub(crate) mod common;
mod communicator;
pub mod traits;
pub mod cpu;
#[cfg(feature = "cuda")]
pub mod cuda;
#[cfg(feature = "wgpu")]
pub mod wgpu;
#[cfg(any(feature = "cuda", feature = "wgpu"))]
pub(crate) mod fallback;
#[cfg(any(feature = "cuda", feature = "wgpu"))]
pub(crate) use common::AllocGuard;
pub(crate) use common::DefaultAllocator;
#[cfg(any(feature = "cuda", feature = "wgpu"))]
pub(crate) use common::compute_contiguous_strides;
pub use common::{AllocationStats, Allocator, Graph, NoOpGraph, TrackingAllocator};
pub(crate) use common::{
compute_broadcast_shape, ensure_contiguous, normalize_dim, validate_arange,
validate_binary_dtypes, validate_eye,
};
#[cfg(feature = "distributed-gpu")]
pub use communicator::HierarchicalCommunicator;
#[cfg(feature = "distributed")]
pub use communicator::NexarNetCommunicator;
pub use communicator::{
Communicator, CommunicatorGroup, NoOpCommunicator, ParallelDim, ReduceOp, StreamSyncOps,
};
#[cfg(feature = "nccl")]
pub use cuda::NcclCommunicator;
pub use traits::{Device, Runtime, RuntimeClient};