Hi,
You can check the warning for the svd function: torch.linalg.svd — PyTorch master documentation 38
In particular it says that gradients are not well defined if there are repeated singular values.
You might want to add a small noise to your matrix to avoid such repeated values I think.