jax
eeb73fe6 - Thread `out_sharding` natively through elementary `jax.random` samplers

Commit
3 days ago
Thread `out_sharding` natively through elementary `jax.random` samplers * Propagate `out_sharding` and inferred parameter shardings (`_sample_sharding`) directly through `uniform`, `randint`, `normal`, `truncated_normal`, `bernoulli`, `cauchy`, `exponential`, `gumbel`, `laplace`, `logistic`, `pareto`, `rayleigh`, `wald`, `triangular`, and `lognormal` via `random_bits` instead of wrapping each sampler in `maybe_auto_axes`. * Validate broadcast-aligned parameter shardings against `out_sharding` (raising `ShardingTypeError` on conflict), sample directly at inferred parameter shardings when `out_sharding=None`, and preserve eager execution under `disable_jit()` across elementary samplers (including `rademacher`, `maxwell`, and `geometric`). * Register `_naryop_collective_rule` on `polynomial_p` so `normal` (`mode='high'` and `'highest'`) lowers under `jax_partitioning`. PiperOrigin-RevId: 1020460678
Author
Parents
Loading