How autograd encodes execution work?