<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Hopper on Li Cao&#39;s Blog</title>
    <link>https://l1-ca0.github.io/tags/hopper/</link>
    <description>Recent content in Hopper on Li Cao&#39;s Blog</description>
    <generator>Hugo -- 0.148.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 29 Aug 2026 20:12:39 +0000</lastBuildDate>
    <atom:link href="https://l1-ca0.github.io/tags/hopper/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>FlashAttention-3 on Hopper</title>
      <link>https://l1-ca0.github.io/posts/flash-attention-3-on-hopper/</link>
      <pubDate>Sat, 29 Aug 2026 20:12:39 +0000</pubDate>
      <guid>https://l1-ca0.github.io/posts/flash-attention-3-on-hopper/</guid>
      <description>&lt;p&gt;&lt;a id=&#34;contents&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;contents&#34;&gt;Contents&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#ch-intro&#34;&gt;1 Introduction and Motivation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-1.1&#34;&gt;1.1 Why attention is the bottleneck&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-1.2&#34;&gt;1.2 The Hopper problem: FA2 leaves most of the H100 idle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-three-ideas&#34;&gt;1.3 The three ideas of FlashAttention-3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-codebase&#34;&gt;1.4 The code base: from CUTLASS C++ to the CuTe DSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-1.5&#34;&gt;1.5 Organization of this post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-hopper&#34;&gt;2 The Hopper GPU Architecture: Features Used by FA3&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-2.1&#34;&gt;2.1 Chip-level anatomy of the H100&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-sm-anatomy&#34;&gt;2.2 The SM: warps, warpgroups, and the asynchronous datapaths&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-tma&#34;&gt;2.3 TMA: the Tensor Memory Accelerator&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-2.3.1&#34;&gt;2.3.1 Multicast and clusters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-mbarrier&#34;&gt;2.4 mbarriers: arrive/wait synchronization in shared memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-wgmma&#34;&gt;2.5 WGMMA: asynchronous warpgroup matrix multiply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-async-proxy&#34;&gt;2.6 The async proxy and memory fences&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-setmaxnreg&#34;&gt;2.7 Register reallocation: &lt;code&gt;setmaxnreg&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-2.8&#34;&gt;2.8 Threadblock clusters, persistent kernels, and occupancy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-sfu&#34;&gt;2.9 The SFU: why softmax is expensive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-2.10&#34;&gt;2.10 Putting it together: the FA3 hardware checklist&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-background&#34;&gt;3 Background: Attention, Online Softmax, FA1/FA2&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-3.1&#34;&gt;3.1 Attention and the quadratic intermediate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-online-softmax&#34;&gt;3.2 Safe softmax and its streaming state&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.2.1&#34;&gt;3.2.1 The block-combine interpretation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.2.2&#34;&gt;3.2.2 Consequences for implementation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fa1-background&#34;&gt;3.3 FlashAttention-1: IO-aware exact attention&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.3.1&#34;&gt;3.3.1 Backward recomputation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.3.2&#34;&gt;3.3.2 First-generation work partitioning&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fa2-background&#34;&gt;3.4 FlashAttention-2: parallelism and work partitioning&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.4.1&#34;&gt;3.4.1 Fewer non-matrix operations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.4.2&#34;&gt;3.4.2 A query block becomes an independent thread-block task&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.4.3&#34;&gt;3.4.3 Split-Q warp partitioning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-3.4.4&#34;&gt;3.4.4 Performance envelope and the remaining Hopper gap&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-3.5&#34;&gt;3.5 FA1, FA2, and FA3 in one comparison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-3.6&#34;&gt;3.6 Kernel anatomy inherited by FA3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-fwd-algo&#34;&gt;4 The FA3 Forward Pass: Algorithm&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-4.1&#34;&gt;4.1 Work decomposition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-online-invariant&#34;&gt;4.2 Online-softmax state and invariant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-producer-consumer&#34;&gt;4.3 Producer–consumer warp specialization&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-4.3.1&#34;&gt;4.3.1 Pipeline-stage ownership&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-pingpong&#34;&gt;4.4 Pingpong scheduling: hiding softmax between warpgroups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-intra-wg&#34;&gt;4.5 Intra-warpgroup overlapping: the 2-stage GEMM–softmax pipeline&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-4.5.1&#34;&gt;4.5.1 Prologue, steady state, and drain&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-softmax-details&#34;&gt;4.6 Softmax details: rescaling, correction, and LSE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-causal&#34;&gt;4.7 Causal masking and the split loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-tile-accounting&#34;&gt;4.8 Per-tile computation and data movement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-tiles&#34;&gt;4.9 Tile sizes, head-dimension variants, and register budgets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-4.10&#34;&gt;4.10 Epilogue&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-fwd-impl&#34;&gt;5 The FA3 Forward Pass: CuTe DSL Implementation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-5.1&#34;&gt;5.1 A note on the CuTe DSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-impl-map&#34;&gt;5.2 Implementation map&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-config&#34;&gt;5.3 Kernel configuration&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-5.3.1&#34;&gt;5.3.1 Compile-time variant selection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-smem&#34;&gt;5.4 Shared memory plan&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-tensor-partitions&#34;&gt;5.4.1 Tensor views and WGMMA partitions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-5.5&#34;&gt;5.5 Kernel entry: pipelines and role dispatch&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-pipeline-cursors&#34;&gt;5.5.1 Pipeline cursors and phase changes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-producer&#34;&gt;5.6 The producer: &lt;code&gt;load&lt;/code&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-5.6.1&#34;&gt;5.6.1 From a scheduled tile to copy coordinates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-consumer&#34;&gt;5.7 The consumer: &lt;code&gt;mma&lt;/code&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-5.7.1&#34;&gt;5.7.1 Accumulator ownership and initialization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-inner-step&#34;&gt;5.8 Core operation: one \(n\)-block with intra-warpgroup overlap&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-5.8.1&#34;&gt;5.8.1 Why each wait and release is safe&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-5.9&#34;&gt;5.9 Pingpong in code: the scheduler barriers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fwd-softmax-code&#34;&gt;5.10 Softmax module&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-5.11&#34;&gt;5.11 Epilogue in code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-cpp-vs-dsl&#34;&gt;5.12 Differences from the paper&amp;rsquo;s CUTLASS C++ kernels&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-fp8&#34;&gt;6 FP8 Forward: Layouts, Block Quantization, Incoherent Processing&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-6.1&#34;&gt;6.1 FP8 formats and accumulation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fp8-transpose&#34;&gt;6.2 The layout problem: K-major operands and the in-kernel V transpose&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-block-quant&#34;&gt;6.3 Block quantization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-hadamard&#34;&gt;6.4 Incoherent processing: the Hadamard transform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-6.5&#34;&gt;6.5 FP8 kernel schedule and performance shape&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-bwd-algo&#34;&gt;7 The FA3 Backward Pass: Algorithm&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-math&#34;&gt;7.1 Gradient math&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.1.1&#34;&gt;7.1.1 The softmax Jacobian, step by step&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.1.2&#34;&gt;7.1.2 Why \(D\) can be computed without \(\mathbf{P}\)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.1.3&#34;&gt;7.1.3 Why LSE alone suffices to recompute \(\mathbf{P}\)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-dlse&#34;&gt;7.1.4 Gradients through LSE itself&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.1.5&#34;&gt;7.1.5 Where the scale \(\alpha\) is applied&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-tiling&#34;&gt;7.2 Tiling and the dQ problem&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.2.1&#34;&gt;7.2.1 Why KV-parallel and not Q-parallel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.2.2&#34;&gt;7.2.2 Causal masking: trapezoidal iteration ranges&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.2.3&#34;&gt;7.2.3 Three ways to resolve the dQ race&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-preprocess&#34;&gt;7.3 The preprocessing and postprocessing kernels&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.3.1&#34;&gt;7.3.1 Preprocess: D, LSElog2, and zeroing dQaccum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.3.2&#34;&gt;7.3.2 Postprocess: dQaccum \(\to\) dQ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-warpspec&#34;&gt;7.4 Warp specialization in the backward&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.4.1&#34;&gt;7.4.1 Named barriers of the backward&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.4.2&#34;&gt;7.4.2 SMEM budget&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-schedule&#34;&gt;7.5 Scheduling the five GEMMs&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-7.5.1&#34;&gt;7.5.1 Operand layouts: who is SS, who is RS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-swapab&#34;&gt;7.5.2 swapAB: transposing the whole GEMM instead of the data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-dq-algo&#34;&gt;7.6 dQ accumulation across thread blocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-7.7&#34;&gt;7.7 Backward tile configurations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-features&#34;&gt;7.8 Causal masking, varlen, and other mainloop features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-perf&#34;&gt;7.9 Backward performance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-bwd-impl&#34;&gt;8 The FA3 Backward Pass: CuTe DSL Implementation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.1&#34;&gt;8.1 Configuration surface&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-smem-layouts&#34;&gt;8.2 SMEM layouts supporting two access orientations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.3&#34;&gt;8.3 Host-side: TMA atoms, schedulers, semaphores, PDL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.4&#34;&gt;8.4 Role dispatch: two producer warps, two consumer warpgroups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.5&#34;&gt;8.5 The producer load loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-bwd-inner-code&#34;&gt;8.6 The consumer inner loop: five GEMMs and two pointwise stages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-dq-accum&#34;&gt;8.7 The dQaccum store agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.8&#34;&gt;8.8 Epilogue: dK/dV stores, and the GQA accumulation path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.9&#34;&gt;8.9 The postprocessing kernel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-8.10&#34;&gt;8.10 Preprocess kernel code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-scheduling&#34;&gt;9 Tile Scheduling, Variable-Length Sequences, and Masking&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-9.1&#34;&gt;9.1 What the tile scheduler controls&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-9.1.1&#34;&gt;9.1.1 Where scheduling appears in the kernel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-9.2&#34;&gt;9.2 The scheduling problem: causal masking skews tile cost&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-9.2.1&#34;&gt;9.2.1 Static, persistent, and dynamic scheduling are not synonyms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-varlen&#34;&gt;9.3 Variable-length sequences (varlen)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-9.3.1&#34;&gt;9.3.1 How the varlen coordinate map works&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-9.4&#34;&gt;9.4 Scheduling and masking: division of responsibility&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-9.4.1&#34;&gt;9.4.1 Correctness invariants for scheduler changes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-9.5&#34;&gt;9.5 GQA and PackGQA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-masking&#34;&gt;9.6 Masking machinery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-paged-kv&#34;&gt;9.7 Paged KV and other serving features&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-splitkv&#34;&gt;10 Flash-Decoding: Split-KV and the Combine Kernel&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-10.1&#34;&gt;10.1 Why decoding underutilizes the GPU&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-splitkv-idea&#34;&gt;10.2 Parallelization over the KV sequence&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-10.2.1&#34;&gt;10.2.1 The combine math&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-combine-kernel&#34;&gt;10.3 The CuTe DSL combine kernel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-10.4&#34;&gt;10.4 How the mainloop produces splits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-num-splits&#34;&gt;10.5 Choosing &lt;code&gt;num_splits&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-10.6&#34;&gt;10.6 Interaction with GQA, paged KV, and varlen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-10.7&#34;&gt;10.7 Performance character and caveats&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-packgqa&#34;&gt;11 PackGQA: Packing Query Heads into the Query Tile&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-11.1&#34;&gt;11.1 Motivation: filling the M tile&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-11.1.1&#34;&gt;11.1.1 What packing changes, and what it preserves&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-packgqa-layout&#34;&gt;11.2 The packed layout: a zero-copy CuTe transformation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#subsection-11.2.1&#34;&gt;11.2.1 TMA with a packed mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-packgqa-copy&#34;&gt;11.3 The gather/scatter path: &lt;code&gt;PackGQA&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-packgqa-mask&#34;&gt;11.4 Masking and per-row head indices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-packgqa-heur&#34;&gt;11.5 Enablement criteria for PackGQA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-11.6&#34;&gt;11.6 Composition with split-KV, and provenance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-performance&#34;&gt;12 Performance Analysis and Benchmarks&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-12.1&#34;&gt;12.1 Forward pass, BF16&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-12.2&#34;&gt;12.2 Backward pass&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sec-fp8-perf&#34;&gt;12.3 FP8 forward&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-12.4&#34;&gt;12.4 An issue-time consistency check&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-12.5&#34;&gt;12.5 Interpreting throughput curves&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-12.6&#34;&gt;12.6 End-to-end implications of attention speedups&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-caveats&#34;&gt;13 Caveats and Pitfalls&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#section-13.1&#34;&gt;13.1 Numerical caveats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-13.2&#34;&gt;13.2 Resource and performance caveats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#section-13.3&#34;&gt;13.3 Minimum validation matrix for kernel changes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#ch-refs&#34;&gt;14 Sources and Further Reading&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#sec-star-14-0&#34;&gt;How the sources were used&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a id=&#34;ch-intro&#34;&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
