Expand description
Memory Management Infrastructure
Provides GPU memory pooling, pressure handling, and analytics context management for high-performance kernel execution.
§Features
- Memory Pools: Size-stratified pools for efficient GPU allocation
- Pressure Handling: Automatic memory pressure detection and mitigation
- Analytics Context: Reusable buffers for analytics workloads
- Reduction Buffers: Cached buffers for GPU reduction operations
- Multi-phase Reductions: Synchronization primitives for iterative algorithms
§Example
ⓘ
use rustkernel_core::memory::{KernelMemoryManager, MemoryConfig};
let config = MemoryConfig::production();
let manager = KernelMemoryManager::new(config);
// Allocate from pool
let buffer = manager.allocate(1024 * 1024)?; // 1MB
// Return to pool
manager.deallocate(buffer);Re-exports§
pub use reduction::CooperativeBarrier;pub use reduction::GlobalReduction;pub use reduction::InterPhaseReduction;pub use reduction::PhaseState;pub use reduction::ReductionBuilder;pub use reduction::ReductionConfig;pub use reduction::ReductionError;pub use reduction::ReductionOp;pub use reduction::SyncMode;
Modules§
- reduction
- Reduction Primitives
Structs§
- Analytics
Context - Analytics context for reusable buffers
- Analytics
Context Manager - Analytics context manager
- Bucket
Stats - Statistics for a size bucket
- Kernel
Memory Manager - Kernel memory manager
- Memory
Buffer - Memory buffer handle
- Memory
Config - Memory configuration
- Memory
Stats - Memory statistics
- Reduction
Buffer - Reduction buffer for GPU reduction operations
- Reduction
Buffer Cache - Reduction buffer cache
- Size
Bucket - Size bucket for memory pool
Enums§
- Memory
Error - Memory errors
- Pressure
Level - Memory pressure level
Type Aliases§
- Alloc
Result - Memory allocation result