KERNELGOLF · v0.16 HOLES OPEN · 5 PLAYERS

$ golf --course front-nine --score strokes

Every character
is a stroke.

Write the shortest kernel that matches the reference output. Then write the fastest one. Par is the length of the reference implementation — beat it and the card marks you under. Two scorecards, one hole.

TRACE hole 01 · row softmax · 88.2µs
THE COURSE
IDProblemShapeParBestFastest
01softmax-rowsnumerically stable, last axis4096×1024314988.2µs
02matmul-squarefp16, tensor cores allowed1024×10245388198.6µs
03layernorm-fwdaffine, eps inside the sqrt8192×7684241142.8µs
04gelu-tanhpure elementwise104857636822.9µs
05reduce-argmaxties resolve to lowest index2048×4096419479.3µs
06conv1d-causaldepthwise, width 4, no lookahead32×512×20485327356.2µs
SCORECARD — HOLE 01
row softmax · par 180
#PlayerBackendStrokesTo parRuntimeSpeedup
1geohottinygrad149−3196.4µs2.23×
2nx7triton158−22103.7µs2.07×
3mmucuda171−988.2µs2.43×
4halide_hmetal186+6121.5µs1.77×