the pytorch path · 0/12
start the path
the gym
pytorch floor

serves pytorch-path chapters 01 · 06 · 08 (and the xla path's collectives chapter) · streaks check themselves off · all floors

Predict the machine, then look.

Three stations, every answer measured, never invented: forty-eight view chains run on real torch, eight compile scenarios verdicted by dynamo's own counters, and five collectives captured from a real four-process gloo run. Predict before the reveal; the streaks keep score in your browser only.

drills

Active recall, one tap

GYM·09 the stride oracle
x = torch.arange(32.).reshape(4, 8)
y = x.flatten()
streak 0torch 2.2.2 · cpu

what is y: shape, stride, contiguous?

48 view chains executed on torch 2.2.2 · shapes, strides, and contiguity read off the real tensors · streak of 5 is the chapter 01 bar
GYM·10 guard or break
def f(x):
    return torch.sin(x) + 1

cf = torch.compile(f)
cf(torch.randn(4))
cf(torch.randn(4))
streak 0torch 2.2.2 · measured

what did dynamo do?

8 compile scenarios verdicted by dynamo's own counters (torch 2.2.2, Python 3.11) · the reveal shows the measured graphs and breaks · serves chapter 06
the fleet
in a table

Name the collective

Four ranks, their tensors before and after one collective, captured from a real four-process gloo run on this machine. The skill is reading what moved: who ended up equal, who kept a partial, who got a slice. It serves the pytorch distributed chapter and the xla path's collectives chapter alike, because the contract does not care which framework called it.

GYM·11 name the collective
rankbeforeafter
0[1, 10][10, 100]
1[2, 20][10, 100]
2[3, 30][10, 100]
3[4, 40][10, 100]
streak 0world 4 · gloo · real run

which collective ran?

5 collectives captured from a real world-of-4 gloo run · before/after tensors verbatim · streak of 5