<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Kernel on k4i's blog</title><link>https://k4i.top/tags/kernel/</link><description>Recent content in Kernel on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>sky_io@outlook.com (K4i)</managingEditor><webMaster>sky_io@outlook.com (K4i)</webMaster><copyright>All content is subject to the license of &lt;a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"&gt;CC BY-NC-SA 4.0&lt;/a&gt; .</copyright><lastBuildDate>Fri, 05 Jun 2026 11:10:00 +0800</lastBuildDate><atom:link href="https://k4i.top/tags/kernel/index.xml" rel="self" type="application/rss+xml"/><item><title>LLM Attention Kernels and GPU Primitives</title><link>https://k4i.top/posts/llm-attention-kernels-gpu-primitives/</link><pubDate>Fri, 05 Jun 2026 11:10:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Fri, 05 Jun 2026 00:26:17 +0800</atom:modified><guid>https://k4i.top/posts/llm-attention-kernels-gpu-primitives/</guid><description>&lt;p&gt;This series is for kernels and GPU primitives. The mechanism series explains why a serving system needs an optimization; this series explains how the optimization works at the kernel and memory-access level.&lt;/p&gt;
&lt;h2 id="existing-posts"&gt;Existing Posts&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://k4i.top/posts/fused-softmax/"&gt;Fused Softmax in Triton&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://k4i.top/posts/online-softmax/"&gt;Online Softmax: Tiling for Arbitrarily Large Rows&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="planned-posts"&gt;Planned Posts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;FlashAttention: how online softmax becomes IO-aware attention&lt;/li&gt;
&lt;li&gt;From FlashAttention to PagedAttention: how attention kernels and cache layout constrain each other&lt;/li&gt;
&lt;li&gt;PagedAttention kernels: how block tables enter the attention memory path&lt;/li&gt;
&lt;li&gt;Triton profiling: using roofline thinking for bandwidth-bound and compute-bound kernels&lt;/li&gt;
&lt;li&gt;Why decode kernels are often limited by HBM bandwidth&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="questions"&gt;Questions Each Post Should Answer&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Which memory access does this kernel remove or reduce?&lt;/li&gt;
&lt;li&gt;How does data move through HBM, L2, shared memory, and registers?&lt;/li&gt;
&lt;li&gt;Does it improve prefill, decode, or both?&lt;/li&gt;
&lt;li&gt;How is it coupled to vLLM / SGLang serving parameters or cache layout?&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/posts/llm-attention-kernels-gpu-primitives/gpu-attention-kernel-icon.svg" medium="image"><media:title type="html">featured image</media:title></media:content><category>llm</category><category>attention</category><category>triton</category><category>cuda</category><category>gpu</category><category>kernel</category><category>AI</category><category>LLM Attention Kernels and GPU Primitives</category></item></channel></rss>