Skip to content

How to support array devices? #65

@Oisin-M

Description

@Oisin-M

Is your feature request related to a problem? Please describe.

We have many functions which use array constructions such as xp.ones(shape), which is problematic if an input is e.g. torch.ones(shape, device="cuda") and torch default device is cpu. Should we be reading the device as well as the array_backend from the inputs and if so, how should it be handled when inputs are not on the same device?

Describe the solution you'd like

We should be able to handle torch inputs regardless of device

Describe alternatives you've considered

xp.ones_like(arr) could implicitly handle this also if we have a reference array we can use

Additional context

No response

Organisation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions