Expand description
Multi-GPU load balancing with automatic frame distribution.
This module provides a MultiGpuScheduler that distributes frames across
all available GPU devices, performing automatic load balancing based on
measured per-device throughput and real-time queue depth.
§Architecture
┌───────────────────────┐
│ MultiGpuScheduler │
│ ───────────────── │
│ • device pool │
│ • load balancer │
│ • frame dispatcher │
└──────────┬────────────┘
┌──────────────────┼────────────────────┐
┌─────▼─────┐ ┌──────▼──────┐ ┌───────▼──────┐
│ GPU 0 │ │ GPU 1 │ │ GPU n … │
│ worker │ │ worker │ │ worker │
└───────────┘ └─────────────┘ └──────────────┘§Load-Balancing Strategies
| Strategy | Description |
|---|---|
RoundRobin | Distribute frames in strict order across devices. |
LeastLoaded | Always assign to the device with the fewest queued frames. |
WeightedCapacity | Assign proportionally to a static device-weight table. |
AdaptiveThroughput | Track measured throughput and route to fastest device. |
§Status
GPU command dispatch is a stub (returns CPU-only results). The scheduling logic and statistics are fully functional.
Structs§
- Device
Slot - A device slot held by the multi-GPU scheduler.
- Device
Stats - Runtime statistics for a single device slot.
- Multi
GpuScheduler - Multi-GPU frame scheduler with configurable load-balancing.
Enums§
- Load
Balance Strategy - Strategy used by
MultiGpuSchedulerto assign work to devices.
Functions§
- distribute_
frames - High-level helper that distributes a batch of frames across devices.