Modern GPUs are engineered for massive parallelism, excelling when executing large, uniform kernels that utilize thousands of threads simultaneously. However, a new class of workloads is emerging—including Deep Reinforcement Learning (RL) physics simulations and dynamic neural networks—that consists of thousands of small, irregular tasks. These workloads often fail to saturate GPU resources, leading to significant inefficiencies. Researchers from the University of Toronto and NVIDIA have proposed ACS (Automatic Concurrent Scheduling) to address this bottleneck by enabling out-of-order, concurrent kernel execution.
The Challenge of Small, Irregular Kernels
In applications like RL, the sequence of operations is often input-dependent. For instance, a physics engine might launch different kernels depending on whether a simulated robot makes contact with an object or moves through free space. Because these kernels are small and their dependencies are unpredictable, they often result in low GPU occupancy, frequently hovering below 40%.
Existing solutions like CUDA Graphs attempt to mitigate launch overhead by pre-defining dependency maps. However, for dynamic workloads, the time required to reconstruct the graph for every new input can consume nearly half (47%) of the total execution time, effectively negating any performance benefits.
Methods: Automatic Concurrent Scheduling (ACS)
ACS introduces a runtime "scheduling window" that identifies independent kernels on the fly, borrowing the concept of out-of-order execution from CPU architecture. Instead of analyzing the entire computational graph, ACS examines a small window of upcoming kernels (typically 16–32) to find work that can be executed in parallel.
To manage dependencies without heavy overhead, ACS utilizes "Kernel Wrappers." These are lightweight metadata annotations that define the memory ranges (start address and size) a kernel will access. If two kernels in the scheduling window have non-overlapping memory ranges, they are marked as ready for concurrent execution.
The paper evaluates two implementation strategies:
- ACS-SW (Software-only): A runtime system that manages multiple CUDA streams to launch independent kernels. This version is compatible with existing off-the-shelf hardware.
- ACS-HW (Hardware-Software Co-design): A proposed modification where the GPU’s Command Processor (CP) directly manages the scheduling window. This reduces the latency associated with CPU-GPU synchronization, which is the primary bottleneck for fine-grained scheduling.
Key Results and Insights
The evaluation of ACS across various workloads—including the Brax physics engine and dynamic DNNs like InstaNAS—demonstrated substantial performance gains:
- Speedup: ACS-SW achieved an average speedup of 1.56× on real hardware, while the simulated ACS-HW reached up to 2.19×.
- Efficiency: By performing dependency planning and execution concurrently, ACS avoids the massive latency spikes associated with graph construction in dynamic environments.
- Occupancy: The framework successfully increased GPU occupancy for RL simulations, moving from the baseline ~34% to levels that better utilize the hardware's compute units.
Conclusion and Future Work
ACS demonstrates that a small scheduling window is sufficient to extract significant parallelism from irregular workloads. While currently reliant on manual memory range annotations, future iterations could see compilers automatically generating these wrappers. By integrating ACS into frameworks like PyTorch or JAX, developers could achieve high GPU utilization for complex, dynamic models without the manual overhead of traditional optimization techniques.
Summary updated