Hello Yuchen!



 Yuchen_Mu:

Hi all, I am trying to calculate the SVD of some complex matrices. It worked fine on the CPU, but when it comes to the GPU, some errors happened,
…
Can anyone give some suggstions on this?


If you can tolerate the risks of living on the “bleeding edge,” it appears
that the nightly build (version 1.8.0) now has complex svd on the gpu:
>>> import torch
>>> torch.__version__
'1.8.0.dev20201203'
>>> torch.svd (torch.randn ([2, 5], dtype = torch.cfloat, device = 'cuda:0'))
torch.return_types.svd(
U=tensor([[-0.9239+0.0000e+00j, -0.3826+1.1088e-08j],
        [ 0.0543+3.7870e-01j, -0.1311-9.1457e-01j]], device='cuda:0'),
S=tensor([2.3032, 1.6723], device='cuda:0'),
V=tensor([[ 0.3954-0.1435j, -0.2532+0.1638j],
        [ 0.0011+0.3421j,  0.1400-0.3463j],
        [ 0.0546-0.4828j, -0.3884-0.4571j],
        [ 0.1831+0.3384j, -0.4973-0.1605j],
        [-0.2001-0.5309j,  0.0373-0.3678j]], device='cuda:0'))

Best.
K. Frank