(beta) Compiling the optimizer with torch.compile
Author: Michael Lazos
The optimizer is a key algorithm for training any deep learning model.
Since it is responsible for updating every model parameter, it can often
become the bottleneck in training performance for large models. In this recipe,
we will apply torch.compile to the optimizer to observe the GPU performance
improvement.