Skip to content

torch.gels on GPU doesn't support m < n #3205

@zou3519

Description

@zou3519

The documentation for torch.gels suggests that when m < n for the input matrix A, then it solves the least norms problem. torch.gels with cuda tensor arguments doesn't do this.

import torch
b = torch.randn(3 ,1)
A = torch.randn(3, 5)
X, _ = torch.gels(b,A)
Y, _ = torch.gels(b.cuda(),A.cuda())  
>> Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: invalid argument 2: A should have m >= n at /home/rzou/pytorch/torch/lib/THC/generic/THCTens
orMathMagma.cu:107

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions