How does GridSample handle overlap of same pixels?

Lets say I have have a repeat of a number of pixels that i want to transform a bunch of values to. But those values of course are of different sizes.

Does it always overwrite / select the larger value, or is it random? (esp on GPU)

Based on this warning from the docs:

When using the CUDA backend, this operation may induce nondeterministic behaviour in its backward pass that is not easily switched off. Please see the notes on Reproducibility for background.

I would assume it’s randomly overwriting the values.