ComputeResources¶
-
class
propertyestimator.backends.
ComputeResources
(number_of_threads=1, number_of_gpus=0, preferred_gpu_toolkit=None)[source]¶ An object which stores how many of each type of computational resource (threads or gpu’s) is available to a calculation worker.
- TODO: The use of the terminology here is questionable, and is used interchangable
with process which may lead to some confusion.
-
__init__
(number_of_threads=1, number_of_gpus=0, preferred_gpu_toolkit=None)[source]¶ Constructs a new ComputeResources object.
- Parameters
number_of_threads (int) – The number of threads available to a calculation worker.
number_of_gpus (int) – The number of GPUs available to a calculation worker.
preferred_gpu_toolkit (ComputeResources.GPUToolkit, optional) – The preferred toolkit to use when running on GPUs.
Methods
__init__
([number_of_threads, …])Constructs a new ComputeResources object.
Attributes
The indices of the GPUs to run on.
The number of GPUs available to a calculation worker.
The number of threads available to a calculation worker.
The preferred toolkit to use when running on GPUs.
-
class
GPUToolkit
[source]¶ An enumeration of the different GPU toolkits to make available to different calculations.
-
property
preferred_gpu_toolkit
¶ The preferred toolkit to use when running on GPUs.