pacman.operations.partition_algorithms package

Module contents

class pacman.operations.partition_algorithms.SplitterPartitioner[source]

Bases: pacman.model.partitioner_interfaces.abstract_splitter_partitioner.AbstractSplitterPartitioner

Partitioner which hands the partitioning work to application vertices’ splitter objects.

MACHINE_EDGE_LABEL = 'machine_edge_for_{}'
__call__(app_graph, machine, plan_n_time_steps, pre_allocated_resources=None)[source]
  • app_graph (ApplicationGraph) – The application_graph to partition
  • machine (Machine) – The machine with respect to which to partition the application graph
  • plan_n_time_steps (int or None) – the number of time steps to plan to run for
  • pre_allocated_resources (PreAllocatedResourceContainer or None) – res needed to be preallocated before making new machine vertices

A machine_graph of partitioned vertices and partitioned edges, and the number of chips needed to satisfy this partitioning.

Return type:

tuple(MachineGraph, int)


PacmanPartitionException – If something goes wrong with the partitioning

create_machine_edge(src_machine_vertex, dest_machine_vertex, common_edge_type, app_edge, machine_graph, app_outgoing_edge_partition, resource_tracker)[source]

Create the machine edge (if needed) and add it to the graph.

Some implementations of this method are able to detect that the requested edge is not actually needed so never create or add it.

  • src_machine_vertex (MachineVertex) – Src machine vertex of a edge
  • dest_machine_vertex (MachineVertex) – Dest machine vertex of a edge
  • common_edge_type (MachineEdge) – The edge type to build
  • app_edge (ApplicationEdge) – The app edge this machine edge is to be associated with.
  • machine_graph (MachineGraph) – Machine graph to add edge to.
  • app_outgoing_edge_partition (OutgoingEdgePartition) – Partition
  • resource_tracker (ResourceTracker) – The resource tracker.

orders the list so that dependent splitters are next to their other splitter in terms of vertex ordering.

Parameters:vertices (iterable(ApplicationVertex)) – the list of application vertices
Returns:vertices in list with new ordering
Return type:iterable(ApplicationVertex)