In-place operations don’t work when operating on tensors that share storage. This code attempts to add tt.t() in place to tt, both of which share underlying storage.
If you want this to work, tt += tt.t().clone() should work.