Kernel optimization infrastructure

让 Kernel 优化高效闭环

Kernaut 以可靠评测基建驱动端到端优化,持续交付经过验证的高品质 Kernel。

DISTRIBUTED · ISOLATED · REPRODUCIBLE
kernaut / optimizeH100 × 8 · LIVE
$kernaut›优化 flash_attention.py,目标延迟低于 90 μs
run 01126.4 μs
run 07101.8 μs
run 1484.2 μs
verified best1.50× faster
statusPASS

核心能力

Core Capability

Kernaut 只有一个产品核心:让 Benchmark 成为优化引擎,而不是优化结束后的附加验证步骤。

Benchmark 是一等公民

模型的每一次判断,都由真实、可靠、可复现的评测结果校准。

  • 调度跨设备并行执行候选,缩短验证周期。
  • 复现环境、输入、版本与指标全程留痕。
  • 裁决同一标准选出真正可以交付的结果。
H100 / 01READY · 80GB
H100 / 02RUN · 64%
A100 / 03READY · 80GB
A100 / 04VERIFY · 92%
BENCHMARK
CONTROL PLANE

每次评测,都可信

隔离环境、固定资源、统一裁决。性能可以快,规则不能被绕过。

01 / ISOLATED

环境隔离

候选代码在独立沙箱运行,不影响宿主与其他评测任务。

02 / LOCKED

资源一致

锁定设备、依赖和输入,让性能结果能够稳定复现。

03 / VERIFIED

防作弊

正确性与性能独立裁决,阻止绕过测试或污染计时。

结果,经得起比较

Benchmark Results

统一环境、固定输入与多次复验,让提升不只是一个数字,而是可回放的性能证据。

Verified pass rate
92.4%
184 / 199 kernels verified
Geomean speedup1.38×
P95 stability±1.7%

KernelBench 风格测试集合 · H100 · FP16/BF16。当前为版式示意数据。

GEMM96.1%
ATTENTION91.3%
CONVOLUTION94.0%
REDUCTION89.2%
NORMALIZATION92.0%

端到端,跑完优化闭环

Kernaut 把代码生成、性能分析与可信评测连成持续迭代系统,直到满足业务目标。

01理解目标读取代码、约束与性能基线
02生成候选探索实现、参数与调度策略
03分布评测并行验证正确性与性能
04分析反馈定位瓶颈并决定下一步
05验证交付复验最优结果并产出制品

两种使用方式

One Engine, Two Modes

需要掌控方向时与模型协作,需要规模化执行时只定义目标。两种方式共享同一套优化与评测引擎。

−□×
workspace / softmaxREADY
› 先别改算法,帮我确认 softmax 在 batch 较小时为什么变慢。
●I’ll profile the small-batch cases and compare launch, memory, and compute time before editing.
Run profile softmax.py --shapes small_batch
Read artifacts/profile_2026-07-14.json
◆Launch overhead is 41% of total latency; memory bandwidth is not saturated.
●The 8-warp configuration is oversized here. I recommend a shape-gated 4-warp path without changing the reduction algorithm.
› 可以,先改这个分支,然后只跑受影响的 shapes。
+ num_warps = 4 if batch_size <= 8 else 8
Run benchmark --shapes affected --repeat 50
✓24.1% faster · 32/32 affected shapes passed · no other files changed.
−□×
workspace / goal-01RUNNING
Goal: Flash Attention latency < 90 μs on H100; correctness 100%; stop after 30 candidates.
●I’ll establish the baseline, explore candidates, reject invalid variants, and stop when the target is verified.
✓ Inspect kernel and benchmark contract
✓ Verify baseline across 128 shapes
✓ Explore tile and warp configurations
○ Re-run winner in isolated sandbox
○ Package code, report, and manifest
Dispatch candidates 01–08 to h100-pool
×3 rejected by correctness gate
◆Candidate 08: 97.1 μs · valid · continuing
Dispatch candidates 09–16 to h100-pool
✓Candidate 14: 84.2 μs · 128/128 shapes passed
●The goal is reached. I’m re-running the winner five times in a clean sandbox before packaging.
Run verify --candidate 14 --clean --repeat 5
✓Goal verified · 1.50× faster · stability ±1.2%

把 Kernel 优化变成持续能力

Benchmark first. Optimize end to end.