A GPipe forward pass takes M plus S minus one time steps: the first micro-batch needs S steps to reach the last stage, and the remaining micro-batches follow one per step.
Implement schedule_steps(stages, micro), the length of the forward schedule.
Add the micro-batch count to the stage count and subtract one.
No results yet
Run your code to check it against the examples, or submit to run every test.