When parameters are partitioned, each GPU stores a contiguous shard. Every shard should be the same size, so the largest shard is the total divided by the device count, rounded up.
Implement shard_size(total, N), the ceiling of total over N.
Use integer ceiling division.
No results yet
Run your code to check it against the examples, or submit to run every test.