dacapo.compute_context.local_torch
Module Contents
Classes
The LocalTorch class is a subclass of the ComputeContext class. |
- class dacapo.compute_context.local_torch.LocalTorch
The LocalTorch class is a subclass of the ComputeContext class. It is used to specify the context in which computations are to be done. LocalTorch is used to specify that computations are to be done on the local machine using PyTorch.
- _device
This stores the type of device on which torch computations are to be done. It can
- Type:
Optional[str]
- take "cuda" for GPU or "cpu" for CPU. None value results in automatic detection of device type.
- property device
A property method that returns the torch device object. It automatically detects and uses “cuda” (GPU) if available, else it falls back on using “cpu”.