Hard
A 1024-step float recurrence on an RTX 4090
The kernel below processes 64 million elements on an RTX 4090 (82.6 TFLOPS FP32, about 1 TB/s of memory bandwidth). Counting two FLOPs per iteration, the engineer's roofline estimate says it is compute-bound and should take about 1.7 ms. It takes over 100 ms, and Nsight Compute shows the FP32 pipe nearly idle. What is the most accurate explanation?
kernel.cu
__global__ void damp(const float* x, float* y, int n) {
int i = blockIdx.x * blockDim.x + threadIdx.x;
if (i >= n) return;
float v = x[i];
float acc = 0.0f;
for (int k = 0; k < 1024; ++k)
acc = acc * 0.999 + v;
y[i] = acc;
}43 of 46 in GPU / CUDA