DevMapperMultiProc

class ivy.DevMapperMultiProc(fn, ret_fn, dev_strs, timeout=None, constant=None, unique=None)[source]

Bases: ivy.core.device.DevMapper

__init__(fn, ret_fn, dev_strs, timeout=None, constant=None, unique=None)[source]

Device Mapper base class.

Parameters
  • fn (callable) – The function which the device mapper parallelises across devices.

  • ret_fn (callable) – The function which receives the ivy.MultiDevIter as input, and produces a single device output.

  • queue_class (class) – The class to use for creating queues.

  • worker_class (class) – The class to use for creating parallel workers.

  • dev_strs (sequence of str) – A list of devices on which to parallelise the function.

  • timeout (float, optional) – The timeout for getting items from the queues. Default is global.

  • constant (dict of any, optional) – A dict of keyword arguments which are the same for each process. Default is None.

  • unique (dict of iterables of any, optional) – A dict of keyword argument sequences which are unique for each process. Default is None.


Supported Frameworks:

empty jax_logo empty tf_logo empty pytorch_logo empty mxnet_logo empty numpy_logo empty