Skip to content

cuda, mps, cpu #92

@mattiaskjellsson

Description

@mattiaskjellsson

It seems to me that there are assumptions of using CUDA? I'm very new to python, but would it make sense to do something like this
if torch.cuda.is_available(): torch.cuda.set_device(local_rank) elif torch.mps.is_available(): torch.mps.set_device(local_rank) else: torch.cpu.set_device(local_rank)

in places where currently

torch.cuda.set_device(local_rank)

is used, or have I misunderstood something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions