4

I have a question about dask distributed.

Assume I would like to run a set of tasks that each run on a different number of GPUs, e.g., one task runs on 2 GPUs (type A), whereas several others run on 1 GPU (type B). My understanding is that it is possible to setup multiple workers with the "resources" property. For example, I may have 3 GPUs in total and setup one worker with resource variable "gpus=2" and another one with "gpus=1". It is clear that "gpus" here is an abstract term (See here).

However, this would mean that after the task of type A has run on the worker with 2 GPUs, this worker would only execute one task of type B at the same time, thereby not utilizing the other other available GPU associated with this worker. Is this correct?

Ideally, I would like to define a single worker with the total number of GPUs (here: 3) that is updated (similar to ncores) when jobs are executed. So, the worker should be able to run the single task of type A and one task of type B in parallel, and afterwards run three tasks of type B in parallel. Is this possible?

Cheers

Celvin
  • 43
  • 2

1 Answers1

3

Yes, you can just state that the worker has three GPUs. The Worker will track the resources of the currently running tasks and ensure that it does not run tasks whose total resource requirements would exceed the worker's resources.

MRocklin
  • 55,641
  • 23
  • 163
  • 235