pacman.operations.routing_info_allocator_algorithms package

Module contents

class pacman.operations.routing_info_allocator_algorithms.ZonedRoutingInfoAllocator(flexible: bool = False)

Bases: object

A routing key allocator that uses fixed zones that are the same for all vertices. This will hopefully make the keys more compressible.

Keys will have the format:

      <--- 32 bits --->
Key:  | A | P | M | X |
Mask: |11111111111|   | (i.e. 1s covering A, P and M fields)
Field A:

The index of the application vertex.

Field P:

The index of the name of outgoing edge partition of the vertex.

Field M:

The index of the machine vertex of the application vertex.

Field X:

Space for the maximum number of keys required by any outgoing edge partition.

The A and P are combined into a single index (AP) so that applications with multiple partitions use multiple entries while ones with only 1 use just one.

The split between the AP bit and other parts is always fixed This also means that all machine vertices of the same application vertex and partition will have a shared key.

The split between the M and X may vary depending on how the allocator is called.

In “global” mode the widths of the fields are predetermined and fixed such that every key will have every field in the same place in the key, and the mask is the same for every vertex. The global approach is particularly sensitive to the one large and many small vertices limit.

In “flexible” mode the size of the M and X will change for each application/partition. Every vertex for a application/partition pair but different pairs may have different masks. This should result in less gaps between the machine vertexes. Even in non-flexible mode if the sizes are too big to keep M and X the same size they will be allowed to change for those vertexes will a very high number of atoms.


flexible (bool) – Determines if flexible can be use. If False, global settings will be attempted

allocate(extra_allocations: Iterable[Tuple[ApplicationVertex, str]]) RoutingInfo[source]

Perform routing information allocation.


extra_allocations (list(tuple(ApplicationVertex,str))) – Additional (vertex, partition identifier) pairs to allocate keys to. These might not appear in partitions in the graph due to being added by the system.


The routing information

Return type:



PacmanRouteInfoAllocationException – If something goes wrong with the allocation