Memory Layouts: Best for LLM Performance

Blocked memory layouts, such as NHWC or NCHWc, are often preferred over plain NCHW for LLMs as they improve data locality and cache utilization, leading to significant speedups, especially in convolutional and attention layers.

Sources

Open the full topic