dacapo.compute_context
Submodules
Package Contents
Classes
Helper class that provides a standard way to create an ABC using |
|
The LocalTorch class is a subclass of the ComputeContext class. |
|
Helper class that provides a standard way to create an ABC using |
Functions
|
Create a compute context based on the global DaCapo options. |
- class dacapo.compute_context.ComputeContext
Helper class that provides a standard way to create an ABC using inheritance.
- abstract property device
- wrap_command(command)
- execute(command)
- dacapo.compute_context.create_compute_context() ComputeContext
Create a compute context based on the global DaCapo options.
- class dacapo.compute_context.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”.