cellmap_flow.utils.device

The device torch work runs on, wherever cellmap-flow picks one.

Functions

best_device()

CUDA when there is one, else Apple's GPU (MPS), else the CPU.

Module Contents

cellmap_flow.utils.device.best_device()

CUDA when there is one, else Apple’s GPU (MPS), else the CPU.

Every choice here was CUDA or the CPU, so a Mac served and trained its models on the CPU, though PyTorch runs on its GPU and Cellpose and bioimageio.core already used it on their own: a Cellpose finetune took about 33 s a batch of eight tiles there, two days for 20 epochs.