Each tile of keys updates a running maximum and sum per row. A softmax rescaled this way gives the exact result.