Skip to content

standard practice for setting "cpu", "cuda", "mps", "gpu" for torch-based tutorials notebooks and functions/classes #226

Description

@bobleesj

Problem

I've been reviewing numpy to torch code including @henrygbell's MAPED #204 and @ehrhardtkm PDF #177 and my recent drift correction #208

At the moment, it appears device selection is a bit scattered:

  1. config.set_device()
  2. validate_device
  3. quantem.yaml where cpu is set
  4. config.get_device() and manually entered within a function/class signature
  5. ...

What is our best practice? A few constraints for users:

  1. device selection should be automated in general
  2. memory usage should be chunked, avoid OOM error as much as we can
  3. ...

Proposed solution

I don't have one yet. I will write some thoughts as I encounter more. Please feel free to suggest any alternatives.

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