Skip to content

How to select GPU programmatically in code #1901

@magic282

Description

@magic282

Hi,

I found this https://github.com/pytorch/examples/pull/73/files to set an env variable to choose GPU.
Is there a way to manually choose GPU programmatically in code? Thanks.

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