KernelGolf
Front nine · open
CUDA · Metal · Triton · tinygrad

Every character
is a stroke.

Write the shortest kernel that matches the reference output. Then write the fastest one. Two scorecards, one hole.

Par — length of the reference implementation
Strokes — characters in your submission
Speedup — measured against the baseline

Scorecard

6 holes · course record 68

HoleProblemShapeParBestFastestField
01Row SoftmaxNumerically stable, last axis4096 × 1024PAR 318014988.2µs4
02Square Matmulfp16, tensor cores allowed1024 × 1024PAR 5420388198.6µs3
03LayerNorm ForwardAffine, eps inside the sqrt8192 × 768PAR 4260241142.8µs2
04GELU (tanh approx)Pure elementwise1048576PAR 3966822.9µs3
05Row ArgmaxTies resolve to lowest index2048 × 4096PAR 421019479.3µs2
06Causal Conv1DDepthwise, width 4, no lookahead32 × 512 × 2048PAR 5340327356.2µs2
Out15061367−1395

Hole 01 · Row Softmax

#PlayerBackendStrokesTo parRuntimeSpeedup
1geohottinygrad149−3196.4µs2.23×
2nx7triton158−22103.7µs2.07×
3mmucuda171−988.2µs2.43×
4halide_hmetal186+6121.5µs1.77×