# Kernel shape distributions **21 kernels, 1104 captured workloads.** Each histogram counts the workload records in one kernel definition's JSONL file. Every bar is one exact combination of its runtime dimensions; identical shapes are combined. The labels retain all runtime dimensions, including dimensions that happen to have one observed value. Model constants appear above each plot. Read bar height (or length in horizontal plots) as the number of captured workloads with that shape. Bins are equally spaced categories, sorted by the dimension values, not continuous numeric intervals. A bar of 1 means one published example; a bar of 6 means six. These are capture counts, not request probabilities, runtime invocation frequencies, or AgentX traffic weights. Multi-dimensional shapes use horizontal bars to keep every dimension readable. Dimension names are explained below each plot; the linked definition specifies complete tensor layouts. Regenerate from the repository root with Python and Matplotlib (rendered with 3.11.2): ```bash python scripts/plot_shape_distributions.py ``` Only definition and workload metadata are needed; tensor snapshots and a GPU are unnecessary. | Kernel definition | Workloads | Distinct shapes | |---|---:|---:| | [prefix_cached_block_causal_h32_d128](#prefix_cached_block_causal_h32_d128) | 28 | 4 | | [prefix_cached_block_causal_h32_d128_prefix0](#prefix_cached_block_causal_h32_d128_prefix0) | 12 | 4 | | [noncausal_dense_attention_h32_d128](#noncausal_dense_attention_h32_d128) | 54 | 18 | | [noncausal_dense_attention_h32_d64](#noncausal_dense_attention_h32_d64) | 108 | 30 | | [gdn_decode_qk4_v8_d128_k_last](#gdn_decode_qk4_v8_d128_k_last) | 54 | 7 | | [gdn_prefill_qk4_v8_d128_k_last](#gdn_prefill_qk4_v8_d128_k_last) | 100 | 77 | | [dense_gemm_bf16_nt_n12288_k4096](#dense_gemm_bf16_nt_n12288_k4096) | 31 | 7 | | [dense_gemm_bf16_nt_n4096_k12288](#dense_gemm_bf16_nt_n4096_k12288) | 31 | 7 | | [dense_gemm_bf16_nt_n4096_k4096](#dense_gemm_bf16_nt_n4096_k4096) | 31 | 7 | | [grouped_gemm_fp8_fp4_e384_n4608_k5120_g32](#grouped_gemm_fp8_fp4_e384_n4608_k5120_g32) | 52 | 11 | | [grouped_gemm_fp8_fp4_e384_n5120_k2304_g32](#grouped_gemm_fp8_fp4_e384_n5120_k2304_g32) | 52 | 11 | | [mixed_mla_decode_deepseek41_h64_d512_k8128_k4512](#mixed_mla_decode_deepseek41_h64_d512_k8128_k4512) | 42 | 30 | | [moe_router_gemm_topk_deepseek41_d5120_e384_topk6](#moe_router_gemm_topk_deepseek41_d5120_e384_topk6) | 50 | 11 | | [neighborhood_attention_3d_h16_d64_kt3_ky7_kx7](#neighborhood_attention_3d_h16_d64_kt3_ky7_kx7) | 9 | 9 | | [neighborhood_attention_3d_h32_d64_kt3_ky7_kx7](#neighborhood_attention_3d_h32_d64_kt3_ky7_kx7) | 9 | 9 | | [neighborhood_attention_3d_h4_d64_kt11_ky11_kx11](#neighborhood_attention_3d_h4_d64_kt11_ky11_kx11) | 9 | 9 | | [neighborhood_attention_3d_h8_d64_kt3_ky5_kx5](#neighborhood_attention_3d_h8_d64_kt3_ky5_kx5) | 18 | 18 | | [qsa_index_topk_decode_qwen38_h4_d128_topk512_c4](#qsa_index_topk_decode_qwen38_h4_d128_topk512_c4) | 192 | 77 | | [qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4](#qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4) | 192 | 64 | | [sparse_mla_prefill_h64_d512_k128](#sparse_mla_prefill_h64_d512_k128) | 10 | 9 | | [sparse_mla_prefill_h64_d512_k640](#sparse_mla_prefill_h64_d512_k640) | 20 | 20 | ## prefix_cached_block_causal_h32_d128 [Definition](../../definitions/block_causal_attention/prefix_cached_block_causal_h32_d128.json) · [Workloads](../../workloads/block_causal_attention/prefix_cached_block_causal_h32_d128.jsonl) · [SVG](prefix_cached_block_causal_h32_d128.svg) ![Shape distribution for prefix_cached_block_causal_h32_d128: 28 workloads across 4 shapes](prefix_cached_block_causal_h32_d128.svg) **Runtime dimensions:** `B`: Runtime batch size. `Nq`: Runtime current query/token count. `Np`: Runtime cached prefix length, possibly zero. `Nall`: Total prefix and current length. ## prefix_cached_block_causal_h32_d128_prefix0 [Definition](../../definitions/block_causal_attention/prefix_cached_block_causal_h32_d128_prefix0.json) · [Workloads](../../workloads/block_causal_attention/prefix_cached_block_causal_h32_d128_prefix0.jsonl) · [SVG](prefix_cached_block_causal_h32_d128_prefix0.svg) ![Shape distribution for prefix_cached_block_causal_h32_d128_prefix0: 12 workloads across 4 shapes](prefix_cached_block_causal_h32_d128_prefix0.svg) **Runtime dimensions:** `B`: Runtime batch size. `Nq`: Runtime current query/token count. `Nall`: Total prefix and current length. ## noncausal_dense_attention_h32_d128 [Definition](../../definitions/dense_attention/noncausal_dense_attention_h32_d128.json) · [Workloads](../../workloads/dense_attention/noncausal_dense_attention_h32_d128.jsonl) · [SVG](noncausal_dense_attention_h32_d128.svg) ![Shape distribution for noncausal_dense_attention_h32_d128: 54 workloads across 18 shapes](noncausal_dense_attention_h32_d128.svg) **Runtime dimensions:** `B`: Runtime batch size. `Nq`: Runtime query length. `Nk`: Runtime key/value length. ## noncausal_dense_attention_h32_d64 [Definition](../../definitions/dense_attention/noncausal_dense_attention_h32_d64.json) · [Workloads](../../workloads/dense_attention/noncausal_dense_attention_h32_d64.jsonl) · [SVG](noncausal_dense_attention_h32_d64.svg) ![Shape distribution for noncausal_dense_attention_h32_d64: 108 workloads across 30 shapes](noncausal_dense_attention_h32_d64.svg) **Runtime dimensions:** `B`: Runtime batch size. `Nq`: Runtime query length. `Nk`: Runtime key/value length. ## gdn_decode_qk4_v8_d128_k_last [Definition](../../definitions/gdn/gdn_decode_qk4_v8_d128_k_last.json) · [Workloads](../../workloads/gdn/gdn_decode_qk4_v8_d128_k_last.jsonl) · [SVG](gdn_decode_qk4_v8_d128_k_last.svg) ![Shape distribution for gdn_decode_qk4_v8_d128_k_last: 54 workloads across 7 shapes](gdn_decode_qk4_v8_d128_k_last.svg) **Runtime dimensions:** `batch_size`: Number of sequences being decoded concurrently. ## gdn_prefill_qk4_v8_d128_k_last [Definition](../../definitions/gdn/gdn_prefill_qk4_v8_d128_k_last.json) · [Workloads](../../workloads/gdn/gdn_prefill_qk4_v8_d128_k_last.jsonl) · [SVG](gdn_prefill_qk4_v8_d128_k_last.svg) ![Shape distribution for gdn_prefill_qk4_v8_d128_k_last: 100 workloads across 77 shapes](gdn_prefill_qk4_v8_d128_k_last.svg) **Runtime dimensions:** `total_seq_len`: total_seq_len `num_seqs`: num_seqs `len_cu_seqlens`: Length of cu_seqlens array (num_seqs + 1). ## dense_gemm_bf16_nt_n12288_k4096 [Definition](../../definitions/gemm/dense_gemm_bf16_nt_n12288_k4096.json) · [Workloads](../../workloads/gemm/dense_gemm_bf16_nt_n12288_k4096.jsonl) · [SVG](dense_gemm_bf16_nt_n12288_k4096.svg) ![Shape distribution for dense_gemm_bf16_nt_n12288_k4096: 31 workloads across 7 shapes](dense_gemm_bf16_nt_n12288_k4096.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## dense_gemm_bf16_nt_n4096_k12288 [Definition](../../definitions/gemm/dense_gemm_bf16_nt_n4096_k12288.json) · [Workloads](../../workloads/gemm/dense_gemm_bf16_nt_n4096_k12288.jsonl) · [SVG](dense_gemm_bf16_nt_n4096_k12288.svg) ![Shape distribution for dense_gemm_bf16_nt_n4096_k12288: 31 workloads across 7 shapes](dense_gemm_bf16_nt_n4096_k12288.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## dense_gemm_bf16_nt_n4096_k4096 [Definition](../../definitions/gemm/dense_gemm_bf16_nt_n4096_k4096.json) · [Workloads](../../workloads/gemm/dense_gemm_bf16_nt_n4096_k4096.jsonl) · [SVG](dense_gemm_bf16_nt_n4096_k4096.svg) ![Shape distribution for dense_gemm_bf16_nt_n4096_k4096: 31 workloads across 7 shapes](dense_gemm_bf16_nt_n4096_k4096.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## grouped_gemm_fp8_fp4_e384_n4608_k5120_g32 [Definition](../../definitions/grouped_gemm/grouped_gemm_fp8_fp4_e384_n4608_k5120_g32.json) · [Workloads](../../workloads/grouped_gemm/grouped_gemm_fp8_fp4_e384_n4608_k5120_g32.jsonl) · [SVG](grouped_gemm_fp8_fp4_e384_n4608_k5120_g32.svg) ![Shape distribution for grouped_gemm_fp8_fp4_e384_n4608_k5120_g32: 52 workloads across 11 shapes](grouped_gemm_fp8_fp4_e384_n4608_k5120_g32.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## grouped_gemm_fp8_fp4_e384_n5120_k2304_g32 [Definition](../../definitions/grouped_gemm/grouped_gemm_fp8_fp4_e384_n5120_k2304_g32.json) · [Workloads](../../workloads/grouped_gemm/grouped_gemm_fp8_fp4_e384_n5120_k2304_g32.jsonl) · [SVG](grouped_gemm_fp8_fp4_e384_n5120_k2304_g32.svg) ![Shape distribution for grouped_gemm_fp8_fp4_e384_n5120_k2304_g32: 52 workloads across 11 shapes](grouped_gemm_fp8_fp4_e384_n5120_k2304_g32.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## mixed_mla_decode_deepseek41_h64_d512_k8128_k4512 [Definition](../../definitions/mixed_mla/mixed_mla_decode_deepseek41_h64_d512_k8128_k4512.json) · [Workloads](../../workloads/mixed_mla/mixed_mla_decode_deepseek41_h64_d512_k8128_k4512.jsonl) · [SVG](mixed_mla_decode_deepseek41_h64_d512_k8128_k4512.svg) ![Shape distribution for mixed_mla_decode_deepseek41_h64_d512_k8128_k4512: 42 workloads across 30 shapes](mixed_mla_decode_deepseek41_h64_d512_k8128_k4512.svg) **Runtime dimensions:** `B`: Runtime batch size. `N8`: Allocated FP8 page count. `P8`: Backend FP8 page size. `N4`: Allocated FP4 page count. `P4`: Backend FP4 page size. ## moe_router_gemm_topk_deepseek41_d5120_e384_topk6 [Definition](../../definitions/moe_router/moe_router_gemm_topk_deepseek41_d5120_e384_topk6.json) · [Workloads](../../workloads/moe_router/moe_router_gemm_topk_deepseek41_d5120_e384_topk6.jsonl) · [SVG](moe_router_gemm_topk_deepseek41_d5120_e384_topk6.svg) ![Shape distribution for moe_router_gemm_topk_deepseek41_d5120_e384_topk6: 50 workloads across 11 shapes](moe_router_gemm_topk_deepseek41_d5120_e384_topk6.svg) **Runtime dimensions:** `M`: Runtime number of token rows. ## neighborhood_attention_3d_h16_d64_kt3_ky7_kx7 [Definition](../../definitions/neighborhood_attention/neighborhood_attention_3d_h16_d64_kt3_ky7_kx7.json) · [Workloads](../../workloads/neighborhood_attention/neighborhood_attention_3d_h16_d64_kt3_ky7_kx7.jsonl) · [SVG](neighborhood_attention_3d_h16_d64_kt3_ky7_kx7.svg) ![Shape distribution for neighborhood_attention_3d_h16_d64_kt3_ky7_kx7: 9 workloads across 9 shapes](neighborhood_attention_3d_h16_d64_kt3_ky7_kx7.svg) **Runtime dimensions:** `B`: Runtime batch size. `T`: Runtime frame count. `Y`: Runtime grid height. `X`: Runtime grid width. ## neighborhood_attention_3d_h32_d64_kt3_ky7_kx7 [Definition](../../definitions/neighborhood_attention/neighborhood_attention_3d_h32_d64_kt3_ky7_kx7.json) · [Workloads](../../workloads/neighborhood_attention/neighborhood_attention_3d_h32_d64_kt3_ky7_kx7.jsonl) · [SVG](neighborhood_attention_3d_h32_d64_kt3_ky7_kx7.svg) ![Shape distribution for neighborhood_attention_3d_h32_d64_kt3_ky7_kx7: 9 workloads across 9 shapes](neighborhood_attention_3d_h32_d64_kt3_ky7_kx7.svg) **Runtime dimensions:** `B`: Runtime batch size. `T`: Runtime frame count. `Y`: Runtime grid height. `X`: Runtime grid width. ## neighborhood_attention_3d_h4_d64_kt11_ky11_kx11 [Definition](../../definitions/neighborhood_attention/neighborhood_attention_3d_h4_d64_kt11_ky11_kx11.json) · [Workloads](../../workloads/neighborhood_attention/neighborhood_attention_3d_h4_d64_kt11_ky11_kx11.jsonl) · [SVG](neighborhood_attention_3d_h4_d64_kt11_ky11_kx11.svg) ![Shape distribution for neighborhood_attention_3d_h4_d64_kt11_ky11_kx11: 9 workloads across 9 shapes](neighborhood_attention_3d_h4_d64_kt11_ky11_kx11.svg) **Runtime dimensions:** `B`: Runtime batch size. `T`: Runtime frame count. `Y`: Runtime grid height. `X`: Runtime grid width. ## neighborhood_attention_3d_h8_d64_kt3_ky5_kx5 [Definition](../../definitions/neighborhood_attention/neighborhood_attention_3d_h8_d64_kt3_ky5_kx5.json) · [Workloads](../../workloads/neighborhood_attention/neighborhood_attention_3d_h8_d64_kt3_ky5_kx5.jsonl) · [SVG](neighborhood_attention_3d_h8_d64_kt3_ky5_kx5.svg) ![Shape distribution for neighborhood_attention_3d_h8_d64_kt3_ky5_kx5: 18 workloads across 18 shapes](neighborhood_attention_3d_h8_d64_kt3_ky5_kx5.svg) **Runtime dimensions:** `B`: Runtime batch size. `T`: Runtime frame count. `Y`: Runtime grid height. `X`: Runtime grid width. ## qsa_index_topk_decode_qwen38_h4_d128_topk512_c4 [Definition](../../definitions/qsa_index/qsa_index_topk_decode_qwen38_h4_d128_topk512_c4.json) · [Workloads](../../workloads/qsa_index/qsa_index_topk_decode_qwen38_h4_d128_topk512_c4.jsonl) · [SVG](qsa_index_topk_decode_qwen38_h4_d128_topk512_c4.svg) ![Shape distribution for qsa_index_topk_decode_qwen38_h4_d128_topk512_c4: 192 workloads across 77 shapes](qsa_index_topk_decode_qwen38_h4_d128_topk512_c4.svg) **Runtime dimensions:** `B`: Runtime batch size. `NP`: Allocated compressed-key page count. `P`: Backend compressed-key page size, measured in micro-blocks. `MP`: Page-table capacity. ## qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4 [Definition](../../definitions/qsa_sparse_gqa/qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4.json) · [Workloads](../../workloads/qsa_sparse_gqa/qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4.jsonl) · [SVG](qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4.svg) ![Shape distribution for qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4: 192 workloads across 64 shapes](qsa_sparse_gqa_decode_qwen38_h24_kv2_d256_topk512_c4.svg) **Runtime dimensions:** `B`: Runtime batch size. `NP`: Allocated cache page count. `P`: Backend token-cache page size. `MP`: Page-table capacity per sequence. ## sparse_mla_prefill_h64_d512_k128 [Definition](../../definitions/sparse_mla/sparse_mla_prefill_h64_d512_k128.json) · [Workloads](../../workloads/sparse_mla/sparse_mla_prefill_h64_d512_k128.jsonl) · [SVG](sparse_mla_prefill_h64_d512_k128.svg) ![Shape distribution for sparse_mla_prefill_h64_d512_k128: 10 workloads across 9 shapes](sparse_mla_prefill_h64_d512_k128.svg) **Runtime dimensions:** `M`: Runtime number of token rows. `Nkv`: Number of latent vectors in the engine workspace. ## sparse_mla_prefill_h64_d512_k640 [Definition](../../definitions/sparse_mla/sparse_mla_prefill_h64_d512_k640.json) · [Workloads](../../workloads/sparse_mla/sparse_mla_prefill_h64_d512_k640.jsonl) · [SVG](sparse_mla_prefill_h64_d512_k640.svg) ![Shape distribution for sparse_mla_prefill_h64_d512_k640: 20 workloads across 20 shapes](sparse_mla_prefill_h64_d512_k640.svg) **Runtime dimensions:** `M`: Runtime number of token rows. `Nkv`: Number of latent vectors in the engine workspace.