Pca_lowrank raises data type error even when converting argument to right data type

Hi,

I’m using torch.pca_lowrank, and am getting this error

*Traceback (most recent call last):*
*File “<string>“, line 1, in <module>*
*File “* /.conda/envs/ldm_clone/lib/python3.8/site-packages/torch/_lowrank.py*”, line 281, in pca_lowrank*
*return _svd_lowrank(A - C, q, niter=niter, M=None)*
*File “* /.conda/envs/ldm_clone/lib/python3.8/site-packages/torch/_lowrank.py*”, line 163, in _svd_lowrank*
*Q = get_approximate_basis(A, q, niter=niter, M=M)*
*File “* /.conda/envs/ldm_clone/lib/python3.8/site-packages/torch/_lowrank.py*”, line 71, in get_approximate_basis*
*Q = torch.linalg.qr(matmul(A, R)).Q*
*RuntimeError: “geqrf_cuda” not implemented for ‘Half’*

I tried passing the data matrix argument as

torch.pca_lowrank(A.float(), q=None, center=True, niter=2)

also tried doing it outside the arguments A=A.float()

can’t understand why this is happening…