Pytorch question : loss backward takes 8 seconds!

Yes, either synchronize or use torch.utils.benchmark which synchronized for you and adds warmup iterations. This post shows an example.

1 Like