Even this works perfectly:
hidden_states_weights[i] = torch.sum(hidden_states_other[l], 0)

I can’t understand why this wouldn’t be an in-place operation, but the other assignments in the above posts are.
Is there a good way to debug which operation is deemed as in-place and thereby, resulting in the error?