Skip to content

B.eye doesn't support tensors on cuda #7

@InfProbSciX

Description

@InfProbSciX

eye doesn't keep tensors on the gpu:

In [1]: import lab as B

In [2]: import lab.torch

In [3]: import torch

In [4]: B.eye(torch.ones((2, 2)).cuda())
Out[4]: 
tensor([[1., 0.],
        [0., 1.]])  # isn't on cuda

I traced this issue back from pinv which fails due to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions