The flat parameter buffer is padded so every rank holds an equal shard. The padding is at most world minus one elements, which is negligible for large models.
Implement fsdp_padded_numel(numel, world), the buffer size after padding.
Round the shard size up, then multiply back by the world size.
No results yet
Run your code to check it against the examples, or submit to run every test.