Ever waited for a slow core while the fast ones sit idle? This paper fixes that for hybrid CPUs.
Hybrid CPUs were wasting their potential.
-----
https://arxiv.org/abs/2411.19542
π― Original Problem:
Hybrid CPUs with different core types (P-cores and E-cores) suffer from imbalanced workload distribution during LLM inference. Traditional parallel methods like OpenMP assign equal work to all cores, making faster cores wait for slower ones.
-----
π§ Solution in this Paper:
β The paper introduces a dynamic parallel method that tracks each core's performance in real-time.
β A CPU runtime component monitors execution time and maintains performance ratios for each core.
β A thread scheduler divides tasks proportionally based on core performance ratios.
β The system continuously updates these ratios during inference to adapt to changing conditions.
-----
π‘ Key Insights:
β Performance ratios between P-cores and E-cores stabilize between 3-3.5x during inference
β Different phases (prefill vs decode) require different workload distributions
β Dynamic adaptation is crucial for optimal hybrid CPU utilization
-----
π Results:
β Achieved 90% memory bandwidth utilization on hybrid Intel CPUs
β 65% compute performance improvement on Ultra-125H
β 85% enhancement on Core-12900K
β 16 tokens/second generation speed










