TL;DR
Synchronous batching leads to inefficiencies in GPU utilization during inference, as the CPU and GPU wait on each other. Asynchronous batching was developed to allow CPU batch preparation and GPU computation to occur simultaneously.
✦ Why It Matters
Engineers can implement asynchronous batching to maximize GPU efficiency and reduce inference costs.
Key Takeaways
How It Works
Asynchronous batching allows the CPU to prepare the next batch while the GPU processes the current one. This is achieved using CUDA streams, which enable concurrent execution of operations.
By recording events in the streams, the system ensures that operations occur in the correct order without blocking the CPU. This method effectively eliminates idle time, maximizing GPU utilization.
Related