← All questions
Inference & ServingMedium· Kernel Fusion· HBM· Memory Bandwidth

Why does the unfused GELU run significantly slower than...

The unfused GELU implementation incurs significant overhead due to multiple HBM round-trips for intermediate results, paying the full bandwidth cost for each pass without performing additional compute. By contrast, kernel fusion maintains all intermediate values within registers. This reduces HBM traffic from approximately ten passes (five reads and five writes) down to just two (one read and one write), drastically improving performance.

Code playground (Python)