One row reduced in two batches
Two columns. On the left, a default matrix multiply kernel reduces the same request row in two tiles when the batch has 1 request and in four tiles when the batch has 37 requests, so the partial sums add in different orders and the last bits of the result can differ. On the right, a batch-invariant kernel uses the same fixed split in both batches, so the result is the same bits in both.
A · DEFAULT KERNEL
B · BATCH-INVARIANT KERNEL
batch of 1
2 partial sums, added in order
logit x
batch of 37
4 partial sums, added in order
logit x, last bits can differ
batch of 1
4 partial sums, added in order
logit x
batch of 37
4 partial sums, added in order
logit x, same bits