Kernel optimization
Kernel optimization 通过改善 GPU kernel 对 compute、memory bandwidth 和 on-chip resource 的使用方式,使其运行得更快、更高效。对于 LLM inference,这通常意味着减少 memory movement、提高 hardware utilization,并将 workload 更合理地映射到 GPU。
面向 LLM inference 的 Kernel optimization
面向 LLM inference 的 kernel optimization 会编写或生成针对 LLM compute pattern 优化的 kernel,从而提升 GPU utilization 和性能。
GPU architecture
4 项
选择合适的 kernel optimization 工具
比较 LLM inference 中用于 kernel optimization 的主要工具,包括 cuBLAS、cuDNN、TVM、XLA、Triton、自定义 CUDA kernel、Mojo 和 MAX。
FlashAttention
FlashAttention 是一种面向 Transformer 的高速、memory-efficient attention algorithm,可以加速 LLM training 和 inference,并帮助实现更长的 context window。