pytc.vmc.sharding.sharded_batched_vmap¶
- pytc.vmc.sharding.sharded_batched_vmap(fn, max_batch_size, mesh=None, in_axes=0, out_axes=0)[source]¶
A version of folx.batched_vmap that works across multiple devices.
It uses
jax.shard_mapto distribute the computation across devices, and thenfolx.batched_vmapon each device to process the local shard in memory-efficient chunks.