I was also able to reproduce the issue and came to the same conclusion as my print statements inside the loop were not shown while the memory increased massively in torch==1.11.0.dev20220108.
@fancy would you mind creating a GitHub issue so that we could track and fix this bug, please?