pacman.operations.routing_info_allocator_algorithms package

Module contents

class pacman.operations.routing_info_allocator_algorithms.ZonedRoutingInfoAllocator

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 normal 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 AP part will be as small as possible represent all AP Keys. If there are fixed keys using the higher bits this may increase. The atoms zone will be large enough for the vertex with the most atoms. The remaining bits will be the machine zone.

In some cases, when there is a mix of machine vertices with a large number of atoms (ex. retinas) and application vertices with a large number of machine vertices, a global split of machine zone and atom zone will not fit. In These case the target machine size will be big enough for application vertices with a large number of machine vertices with the remaining bits being the target atom zone. Most vertices will be able to use this split. The few vertices with a large number of atoms will then not respect the split between machine and atoms zones.

allocate() RoutingInfo[source]

Perform routing information allocation.

Returns:

The routing information

Raises:

PacmanRouteInfoAllocationException – If something goes wrong with the allocation