13Sum 100 million floats on the GPU as fast as the hardware allows. Write the kernel and justify each step.▼mediumNewNVIDIA4 replies○ sign inA sum reads every byte once and does one add per element, so the only question is whether you reach the bandwidth ceiling. The ceiling in milliseconds, four versions from an atomic per element to warp shuffles with sixteen loads in flight, and the bytes-in-flight math behind the last jump.Open full answer →
19A take-home gives you a working layernorm kernel at a tenth of memory bandwidth. Make it fast and justify every change.▼hard★ EssentialNewAnthropic4 replies○ sign inNormalization reads a row and writes a row, so a copy sets the ceiling and everything else is overhead you can remove. The six changes in the order a reviewer wants them, what each is worth, and the one that is a correctness fix rather than a speed fix, with the measured error that proves it.Open full answer →