Skip to main content

Module multi_gpu

Module multi_gpu 

Source
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

StrategyDescription
RoundRobinDistribute frames in strict order across devices.
LeastLoadedAlways assign to the device with the fewest queued frames.
WeightedCapacityAssign proportionally to a static device-weight table.
AdaptiveThroughputTrack 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§

DeviceSlot
A device slot held by the multi-GPU scheduler.
DeviceStats
Runtime statistics for a single device slot.
MultiGpuScheduler
Multi-GPU frame scheduler with configurable load-balancing.

Enums§

LoadBalanceStrategy
Strategy used by MultiGpuScheduler to assign work to devices.

Functions§

distribute_frames
High-level helper that distributes a batch of frames across devices.