One reason for the memory growth is that you are storing the whole computation graph in train_loss by summing loss to it.
Since you only need train_loss to print the current loss, you should detach the computation graph from it and just store the loss value:
train_loss += loss.item()

It should cause a memory growth on other platforms as well, so there might be another issue.
Let me know, if that solves the problem.