pacman.utilities.algorithm_utilities package

Submodules

pacman.utilities.algorithm_utilities.element_allocator_algorithm module

class pacman.utilities.algorithm_utilities.element_allocator_algorithm.ElementAllocatorAlgorithm(size_begin, size_end)[source]

Bases: object

Abstract element allocator algorithm which allocates elements from a pool of a given size

pacman.utilities.algorithm_utilities.field_based_system_utilities module

class pacman.utilities.algorithm_utilities.field_based_system_utilities.TYPES_OF_FIELDS

Bases: enum.Enum

FIXED_FIELD = 2
FIXED_KEY = 1
FIXED_MASK = 0
pacman.utilities.algorithm_utilities.field_based_system_utilities.convert_mask_into_fields(entity)[source]
Parameters:entity
pacman.utilities.algorithm_utilities.field_based_system_utilities.deduce_types(graph)[source]

deducing the number of applications required for this key space

Parameters:graph
pacman.utilities.algorithm_utilities.field_based_system_utilities.handle_flexi_field(constraint, seen_fields, known_fields)[source]
Parameters:
  • constraint
  • seen_fields
  • known_fields
Return type:

None:

pacman.utilities.algorithm_utilities.machine_algorithm_utilities module

pacman.utilities.algorithm_utilities.machine_algorithm_utilities.create_virtual_chip(machine, link_data, virtual_chip_x, virtual_chip_y)[source]

pacman.utilities.algorithm_utilities.partition_algorithm_utilities module

A collection of methods which support partitioning algorithms.

pacman.utilities.algorithm_utilities.partition_algorithm_utilities.generate_machine_edges(machine_graph, graph_mapper, application_graph)[source]

Generate the machine edges for the vertices in the graph

Parameters:
  • machine_graph (pacman.model.graph.machine.machine_graph.MachineGraph) – the machine graph to add edges to
  • graph_mapper (pacman.model.graph_mapper.GraphMapper) – the mapper graphs
  • application_graph (pacman.model.graph.application.application_graph.ApplicationGraph) – the application graph to work with
pacman.utilities.algorithm_utilities.partition_algorithm_utilities.get_remaining_constraints(vertex)[source]

Gets the rest of the constraints from a vertex after removing partitioning constraints

pacman.utilities.algorithm_utilities.placer_algorithm_utilities module

pacman.utilities.algorithm_utilities.placer_algorithm_utilities.get_same_chip_vertex_groups(vertices)[source]

Get a dictionary of vertex to vertex that must be placed on the same chip

pacman.utilities.algorithm_utilities.placer_algorithm_utilities.sort_vertices_by_known_constraints(vertices)[source]

Sort vertices to be placed by constraint so that those with more restrictive constraints come first.

pacman.utilities.algorithm_utilities.routing_info_allocator_utilities module

pacman.utilities.algorithm_utilities.routing_info_allocator_utilities.check_types_of_edge_constraint(machine_graph)[source]

Go through the graph for operations and checks that the constraints are compatible.

Parameters:machine_graph – the graph to search through
Return type:None:
pacman.utilities.algorithm_utilities.routing_info_allocator_utilities.get_edge_groups(machine_graph)[source]

Utility method to get groups of edges using any pacman.model.constraints.key_allocator_same_key_constraint.KeyAllocatorSameKeyConstraint constraints. Note that no checking is done here about conflicts related to other constraints.

Parameters:machine_graph – the machine graph
pacman.utilities.algorithm_utilities.routing_info_allocator_utilities.get_fixed_mask(same_key_group)[source]

Get a fixed mask from a group of edges if a pacman.model.constraints.key_allocator_same_key_constraint.KeyAllocatorFixedMaskConstraint constraint exists in any of the edges in the group.

Parameters:same_key_group (iterable of pacman.model.graph.machine.machine_edge.MachineEdge) – Set of edges that are to be assigned the same keys and masks
Returns:The fixed mask if found, or None
Raises:PacmanValueError – If two edges conflict in their requirements

Module contents