3 Commits

Author SHA1 Message Date
jax authors
13541e9f12 Make blocked_fold_in consistent when the block sizes induce padding
Add coverage for padded shapes to unit tests.

PiperOrigin-RevId: 738029476
2025-03-18 09:12:11 -07:00
jax authors
b4966130a3 Compute tile index using tile-based coordinates
This reduces the chances of overflowing a 32-bit integer when computing tile indices.
Add unit test to reproduce the overflow with the previous implementation of `blocked_fold_in`.

PiperOrigin-RevId: 737778853
2025-03-17 15:46:27 -07:00
Justin Fu
8ba8f3bf65 [Pallas] Implement block-invariant sampling.
PiperOrigin-RevId: 646161271
2024-06-24 11:20:39 -07:00