Beyond the "Either-Or" Mentality
In the modern era of accelerator-based computing, the CPU is frequently relegated to a secondary role, acting merely as a manager that offloads data to the GPU and remains idle while waiting for results. This has fostered a persistent "myth" in high-performance computing: that one must choose between a CPU or a GPU for a specific task.
This paper challenges that rivalry, arguing that leaving multi-core CPUs idle during heavy computation is a waste of valuable resources. Instead, the authors propose a hybrid computing model where both processors work in tandem. By leveraging the unique architectural strengths of both multicore CPUs and many-core GPUs simultaneously, they demonstrate significant improvements in performance and resource efficiency.
Algorithmic Strategies for Hybrid Computing
To effectively partition workloads, the authors developed two primary strategies:
- Work Sharing: This approach decomposes a problem into data segments, distributing them between the CPU and GPU. For instance, in Sparse Matrix-Vector Multiplication (SpMV), dense rows are assigned to the GPU (which excels at regular patterns), while sparse rows are handled by the CPU (which is better equipped for irregular memory access).
- Task Parallelism: This strategy treats computation as a graph of interdependent tasks, mapping specific functions to the processor best suited for them. In Bilateral Filtering, the CPU precomputes expensive transcendental functions into look-up tables, which the GPU then utilizes to process pixels.
These strategies were implemented using OpenMP for CPU multithreading and CUDA for GPU acceleration, with a focus on minimizing the "idle time" of both processors.
Diverse Workloads and Methodology
The study evaluated 13 diverse workloads across various application areas, from image processing to computational finance. These workloads were chosen to represent a wide spectrum of computational characteristics, including regular and irregular memory access patterns, as well as compute-bound and memory-bound tasks.
Datasets included synthetic "Uniformly At Random" (UAR) data for tasks like sorting and convolution, alongside standard benchmarks such as the "Notre Dame 715" dataset for bundle adjustment and medical imaging volumes for ray casting.
Key Results and Insights
The authors compared their hybrid solutions against optimized GPU-only implementations across two platforms:
- High-End Platform (Intel i7-980X + Tesla T10): Achieved an average 29% performance improvement. Notable gains were seen in List Ranking (57.7%) and Connected Components (45.16%).
- Low-End Platform (Core 2 Duo + GT520): Surprisingly, commodity hardware saw even higher percentage gains, averaging a 37% improvement. This suggests that hybrid computing is highly relevant for everyday desktop users, not just supercomputing clusters.
- Resource Efficiency: By fine-tuning the "work-share threshold," the authors achieved approximately 90% resource efficiency, meaning both processors were active and productive for the vast majority of the execution time.
Challenges and Future Directions
Despite the clear benefits, hybrid computing faces several hurdles. The primary bottleneck remains the PCIe bus, where the cost of transferring intermediate results between processors can sometimes negate parallel execution gains. Additionally, determining the optimal "work-share threshold" currently requires manual, empirical tuning for different hardware configurations.
Future work will focus on automating the mapping of tasks to processors—an NP-complete problem—and exploring tighter architectural integration, such as AMD Fusion or Intel MIC, to further reduce communication latency.
Summary updated