tff.framework.ComposingExecutorFactory

Stay organized with collections Save and categorize content based on your preferences.

Factory class encapsulating executor compositional logic.

Inherits From: ExecutorFactory

This class is responsible for aggregating lists of executors into a compositional hierarchy based on the max_fanout parameter.

Methods

clean_up_executor

View source

Holds no executors internally, so passes on cleanup.

create_executor

View source

Creates an executor hierarchy of maximum width self._max_fanout.

First creates a flat list of executors to aggregate, using the flat_stack_fn passed in at initialization. Then composes this list into a hierarchy of width at most self._max_fanout.

Args
cardinalities A mapping from placements to integers specifying the cardinalities at each placement

Returns
An executor_base.Executor satisfying the conditions above.