04 / NOTES

Deep dives.
Open notes.

Research spotlights, implementation notes, and experiments from the hardware-agent and AI-systems workbench.

Research spotlightsHardware agentsGPU systems series ↗Evidence register ↗

RESEARCH SPOTLIGHTS

Eight works.
Eight stories.

Each spotlight explains the motivation, system design, evidence, and broader significance behind one research project.

CircuitWeave multimodal RTL generation
ARXIV 20268 MIN

CircuitWeave:拓扑与行为对齐

用拓扑契约、行为契约和统一电路契约连接文本、原理图与可执行 RTL。

RTLMultimodal
CircuitMind multi-agent circuit generation
ARXIV 20258 MIN

CircuitMind:多智能体门级优化

让多个专业智能体共同跨越门级设计中的布尔优化障碍。

Multi-agentEDA
ReasoningV adaptive Verilog reasoning
ICAIS 20258 MIN

ReasoningV:按难度分配推理

通过高质量数据、两阶段训练和自适应推理提高 Verilog 生成效率。

VerilogReasoning
TARO post-PnR RTL optimization
RESEARCH PREVIEW8 MIN

TARO:Post-PnR 趋势反馈

用双尺度 PPA 梯度、软锚定和结构记忆指导昂贵反馈下的 RTL 搜索。

PPAOpenROAD
Agentic Kernel Workflows
DAI 2026 PREVIEW9 MIN

AKW:可执行 Kernel 优化策略

把散落在论文、代码和评测工具中的专家方法重建为可审计工作流。

GPU KernelWorkflow
KerSor kernel workflow orchestration
DAI 2026 PREVIEW9 MIN

KerSor:编排多个优化工作流

在有限预算下显式管理工作流选择、类型化交接和停止决策。

OrchestrationMulti-agent
EngineTailor: target-specialized inference with independent verification
RESEARCH NOTE · OCT 289 MIN

EngineTailor: Minimal complete inference engines

A faithful fusion can fail a naive check; a passing candidate can be slower. Experimental lessons from agent-driven inference optimization.

InferenceEdge AI
KernelEval engine-contract benchmark
DAI 2026 PREVIEW9 MIN

KernelEval:真实引擎替换评测

评估生成 Kernel 是否保持量化引擎 contract 并击败同硬件 incumbent。

BenchmarkQuantization

FEATURED NOTE

Latest from
the workbench.

Practical writing focused on the path from a readable baseline to an implementation that respects real hardware.

M1 Pro 上 MLX 官方实现与 ApxInf 的同轨迹对局
11 MIN

同一局马里奥,两个引擎

左边 MLX 官方实现,右边 ApxInf:同一模型、同一策略、同一动作序列,慢的只是模型思考时间。M1 Pro 上 152.4 s vs 76.5 s。

ApxInfApple Silicon
GPU Megakernel beginner course from GPU fundamentals to falsifiable experiments
54 LESSONS

GPU Megakernel 实战课:从 GPU 基础到可证伪实验

不要求 GPU 基础:每课先用日常问题和生活类比讲直觉,再进入 Llama、Persistent Kernel、资源、内存序与实验。

MegakernelCourse
FP8 backend policy selected by phase, M bucket, projection role, and correctness
30 MIN

为什么 FP8 不能全模型一键打开?

从 scale granularity、large-M DeepGEMM 与 B1 down-only selector 理解 precision 为什么属于 execution cell。

FP8DeepGEMM
Merged QKV changes verdict when the downstream consumer becomes stride-generic
28 MIN

为什么 QKV 先拆开更快,后来合并又更快?

从 strided view、implicit contiguous copy 与 stride-generic consumer 理解 producer layout 的 sign flip。

QKVStride
Masked KV tail versus physically pruned live-context CUDA Graph bucket
28 MIN

为什么 Mask 掉的 KV 仍然要付费?

从 logical mask、physical KV slice 与 strict bucket crossing 理解静态 Graph 如何随 live context 缩放物理工作。

KV CacheAttention
Two phase-specific CUDA Graph contracts for prefill and decode
31 MIN

为什么一张 CUDA Graph 不够?

用稳定地址与动态 device state,把 B1/T64 prefill 和 B16/K256 decode 拆成两个可回滚的 scenario leaves。

CUDA GraphServing
An isolated GPU node wins while the real joined DAG regresses
30 MIN

为什么节点快 46.7%,Joined DAG 反而更慢?

从 branch slack、max-join、profiler authority 与 fusion overlap 理解 local saving 和 exposed saving 的差别。

Critical PathFusion
MoE route capacity, compact active prefix, and persistent fast drain
27 MIN

为什么删掉 67% 的“空 Row”仍然不快?

区分 route capacity、compact metadata prefix、persistent admitted work 与真正被删除的数据边。

MoE RoutingCLC
DRAM bytes decrease while matched kernel wall-time increases
30 MIN

为什么 DRAM 流量减半,Kernel 反而更慢?

从 FP8 decode tax、vector width、warp issue、MLP 与 matched event 理解为什么单一 profiler counter 不能宣布 winner。

BandwidthMLP
Direct load, cp.async, and TMA paths for one-shot recurrent state
30 MIN

为什么 TMA 比 cp.async 快,却仍输给普通 LDG?

从一次性 state、SMEM second hop、mbarrier 与 CTA residency 理解为什么更先进的 copy primitive 不一定缩短路径。

TMAcp.async
FMHA CTA topology as launch, numerical, and performance semantics
29 MIN

为什么少用 CTA 反而会算错?

从完整 GQA head group、KV split 与 softmax partial tree 理解 CTA topology 如何改变合法性、数值和性能。

FMHAReduction
Verify the candidate path before trusting benchmark timing
27 MIN

为什么 Benchmark 变快了,却可能根本没跑你的 Kernel?

从 fallback、phase、same-path baseline 与 CUDA Graph identity 理解为什么 path hit 必须先于计时。

Path HitGuardrail
Seven evidence gates for deciding when to stop GPU optimization
28 MIN

什么时候应该停止优化?

从 path hit、ABI、正确性、A/A 噪声、Amdahl ceiling、端到端反转到 formal holdout,建立七道证据门。

STOP RuleEvidence
Projection kernel winner at 2K versus bottleneck migration at 64K
27 MIN

为什么 2K 上快 9% 的 Kernel 到 64K 就消失?

区分 cold/cached/decode 计时边界,并用 Amdahl、DeepEP 与 DSA/index-score 解释长上下文瓶颈迁移。

64KAmdahl
Register occupancy and ILP cliffs on B200
28 MIN

寄存器越少越快吗?

比较 RMSNorm 40→32 与 single decode 56→80 的相反方向,理解 occupancy、ILP、spill 和 shape-specific cliff。

RegistersOccupancy
TP2 symmetric memory source-owned payload publication and slow-rank timing
27 MIN

为什么少写一半 Store,模型只快 0.02%?

从 source-owned symmetric pull、transport numerical protocol 和 slow-rank wall 理解通信关键路径。

TP2Ownership
GPU-resident ready queue with release-acquire, slot lifetime, and forward-progress budget
31 MIN

GPU 内的 Ready Queue 为什么可能死锁?

从 memory visibility、epoch、slot lifetime 和 producer residency 理解 GPU-resident control 的双重正确性合同。

RuntimeProgress
Byte-exact FP8 fusion across payload, scale ABI, BF16 rounding, and reduction tree
30 MIN

为什么 FP8 Fusion 最难的是一个 Byte 都不能变?

从 reciprocal、BF16 round、reduction tree 与 call frequency 理解 Fusion 的数值和关键路径合同。

FP8Fusion
Named barrier, phase fusion, pending TMA store, and L2 prefetch outcomes
28 MIN

为什么“更异步”会变慢?

比较不同 resident execution shape,理解 ownership、occupancy、dependency window 与 live state 如何让异步技巧变号。

BarrierTMA
SubCUDA scalar BF16 to vector I/O and CUDA-versus-PTX comparison
28 MIN

手写 PTX 真的有 CUDA 做不到的能力吗?

从标量 BF16 到宽 vector I/O,再用 CUDA counterfactual 测量机制收益与当前 schedule gap。

PTXSASS
MegaKernel boundary optimization around unchanged GEMMs
25 MIN

为什么 MegaKernel 不该只盯着 GEMM?

从 RoPE 原地更新、K/V combined scatter 和 fused add/RMSNorm 出发,理解删除高频 non-GEMM seam 如何穿透到 HTTP serving。

MegaKernelServing
GLM-5.2 decode winner oracle across operation, phase, local M, ABI, and CUDA Graph
28 MIN

为什么三个 Kernel Winner 组合起来只快 5.66%?

从 local M、fixed-NK、生产 ABI、CUDA Graph 和 path-hit 出发,理解为什么 winner 是一个带坐标的事实。

CUDA GraphB300
GLM-5.2 N6 expert placement, router mapping, and DeepEP dispatch
26 MIN

为什么搬一搬 Expert 就能让 8 张 B300 更快?

从 logical/physical expert ID、Router 的最终写出格式和 DeepEP 的资源预算出发,理解跨三张执行 DAG 的关键路径优化。

DeepEPB300
Megakernel and multistream GPU execution strategies
32 MIN

从 80 μs 到 36.992 μs

以 GLM-5.2-FP8 decode 子图为例,拆解 Megakernel、Multistream 和 PDL 各自解决什么问题,以及为什么关键路径分析决定最终选择。

MegakernelPDL
MoE expert specialization and concurrent GPU streams
35 MIN

一个 MoE Kernel 为什么不够用

从 Per-Expert Kernel 选择、Problem Size Mask 与真实 TMA 数据量出发,解释为什么 MoE 优化最终还需要多 Stream 并发。

MoETMA
Quantized GEMM technical cover
25 MIN

量化GEMM深度解析:从Naive实现到llama.cpp MMQ优化

从量化格式和数学原理出发,逐步分析 Naive GEMM、Q8_1 补偿项与 llama.cpp MMQ kernel 的工程优化。

GEMMQuantization
AI image generation prompt examples
12 MIN

AI Image Generation Prompts Showcase

A practical guide to creating technical project and blog covers with structured image-generation prompts.

AIDesign
CUDA reduce source-code cover
10 MIN

CUDA Reduce: 完整代码实现与测试指南

Complete, compilable CUDA reduction examples with test harnesses and build instructions.

CUDAC++
CUDA Reduce 5 optimization cover
15 MIN

CUDA Parallel Reduction: Reduce 5

Warp unrolling, template metaprogramming, memory coalescing, and the reasoning behind a classic optimization.

CUDAOptimization
CUDA Cooperative Groups cover
12 MIN

CUDA Cooperative Groups: Thread Hierarchy

Explicit synchronization, tiled groups, and safer ways to reason about the CUDA thread hierarchy.

CUDACooperative Groups
CUDA reduction evolution cover
15 MIN

CUDA Reduction Evolution

A three-stage path from modern Cooperative Groups to warp shuffle and standard-library implementations.

GPUPerformance
NVIDIA GPU architecture evolution cover
10 MIN

NVIDIA GPU Architecture Evolution

The architectural ideas that shaped NVIDIA GPUs from Tesla through Hopper.

GPUArchitecture

KEEP EXPLORING

Code beside
the notes.

Many articles are paired with runnable examples, kernel experiments, and learning repositories on GitHub.

Browse GitHub