pacman.model.partitioner_splitters.abstract_splitters package

Module contents

class pacman.model.partitioner_splitters.abstract_splitters.AbstractSplitterCommon(splitter_name=None)

Bases: object

Parameters:splitter_name (str) –
DEFAULT_SPLITTER_NAME = 'AbstractSplitterCommon'
FIXED_ABOVE_MAX = 'Illegal attempt to set fixed atoms per core to {} as that is above a previously set max atoms of {}'
FIX_ATOMS_RESET = 'Illegal attempt to set fixed atoms per core to {} as it was already set to {}'
MAX_BELOW_FIXED = 'Illegal attempt to set max atoms per core to {} as that is lower than the previously set fixed of {}'
check_supported_constraints()[source]
Raises:PacmanInvalidParameterException – When partitioner constraints are used.
create_machine_vertices(chip_counter)[source]

Method for specific splitter objects to override.

Parameters:chip_counter (ChipCounter) – counter of used chips
get_in_coming_slices()[source]

The slices of the input vertices.

Returns:list of Slices
Return type:list(Slice)
get_in_coming_vertices(partition_id)[source]

Get machine post vertices for a given partition.

The input vertices are the ones that will serve as target vertices for external edges. Note this method returns all that could be used for any source machine vertex in the given partition.

Parameters:partition_id (str) – The identifier of the incoming partition
Return type:list(MachineVertex)
get_internal_multicast_partitions()[source]
Get edge partitions between machine vertices that are to be
handled by Multicast. Returns empty by default, override if there are Multicast connections between internal vertices
Return type:list(MulticastEdgePartition)
get_internal_sdram_partitions()[source]
Get edge partitions between machine vertices that are to be
handled by SDRAM. Returns empty by default, override if there are SDRAM connections between internal vertices
Return type:list(AbstractSDRAMPartition)
get_out_going_slices()[source]

The slices of the output vertices.

Returns:list of Slices
Return type:list(Slice)
get_out_going_vertices(partition_id)[source]

Get machine pre vertices

The output vertices are the ones that will serve as source vertices for external edges.

Parameters:partition_id (str) – The identifier of the outgoing partition
Return type:list(MachineVertex)
get_same_chip_groups()[source]
Get a list of lists of vertices and sdram which must be
allocated on the same chip. By default this returns a list of each machine vertex and its SDRAM; override if there are groups of machine vertices on the same chip.
Return type:list(list(MachineVertex), AbstractSDRAM)
get_source_specific_in_coming_vertices(source_vertex, partition_id)[source]

Get machine post vertices for a given source.

The input vertices are the ones that will serve as target vertices for external edges. Note this method allows filtering of the targets for a specific source machine vertex.

This default method makes every machine vertex a target for the source. This should be overridden if there are specific machine vertices for any given source vertex.

Parameters:
  • source_vertex (ApplicationVertex) – The source to get incoming vertices for
  • partition_id (str) – The identifier of the incoming partition
Returns:

A list of tuples of (target machine vertex, list of source machine or application vertices that should hit the target)

Return type:

list(tuple(MachineVertex, list(MachineVertex or ApplicationVertex)))

governed_app_vertex
Return type:ApplicationVertex
machine_vertices_for_recording(variable_to_record)[source]

Gets the machine vertices which are recording this variable.

Parameters:variable_to_record (str) – the variable to get machine verts for.
Returns:list of machine vertices
Return type:iterable(MachineVertex)
reset_called()[source]

reset the splitter to be as if it has not operated a splitting yet.

set_governed_app_vertex(app_vertex)[source]

Sets a app vertex to be governed by this splitter object. Once set it can’t be reset

Parameters:app_vertex (ApplicationVertex) – the app vertex to govern
Raises:PacmanConfigurationException – if the app vertex has already been set.