pacman.model.graphs package¶
Subpackages¶
- pacman.model.graphs.application package
- Subpackages
- Module contents
Application2DFPGAVertexApplication2DSpiNNakerLinkVertexApplicationEdgeApplicationEdgePartitionApplicationFPGAVertexApplicationFPGAVertex.get_incoming_slice_for_link()ApplicationFPGAVertex.get_outgoing_link_data()ApplicationFPGAVertex.get_outgoing_slice()ApplicationFPGAVertex.incoming_fpga_connectionsApplicationFPGAVertex.n_atomsApplicationFPGAVertex.n_machine_vertices_per_linkApplicationFPGAVertex.outgoing_fpga_connection
ApplicationGraphApplicationGraph.add_edge()ApplicationGraph.add_vertex()ApplicationGraph.edgesApplicationGraph.get_outgoing_edge_partition_starting_at_vertex()ApplicationGraph.get_outgoing_edge_partitions_starting_at_vertex()ApplicationGraph.n_outgoing_edge_partitionsApplicationGraph.n_verticesApplicationGraph.outgoing_edge_partitionsApplicationGraph.reset()ApplicationGraph.vertex_by_label()ApplicationGraph.vertices
ApplicationSpiNNakerLinkVertexApplicationSpiNNakerLinkVertex.board_addressApplicationSpiNNakerLinkVertex.get_incoming_slice()ApplicationSpiNNakerLinkVertex.get_max_atoms_per_core()ApplicationSpiNNakerLinkVertex.get_outgoing_link_data()ApplicationSpiNNakerLinkVertex.get_outgoing_slice()ApplicationSpiNNakerLinkVertex.incomingApplicationSpiNNakerLinkVertex.n_atomsApplicationSpiNNakerLinkVertex.n_machine_verticesApplicationSpiNNakerLinkVertex.outgoingApplicationSpiNNakerLinkVertex.spinnaker_link_id
ApplicationVertexApplicationVertex.add_incoming_edge()ApplicationVertex.atoms_shapeApplicationVertex.get_fixed_key_and_mask()ApplicationVertex.get_key_ordered_indices()ApplicationVertex.get_machine_fixed_key_and_mask()ApplicationVertex.get_max_atoms_per_core()ApplicationVertex.get_max_atoms_per_dimension_per_core()ApplicationVertex.get_raster_ordered_indices()ApplicationVertex.has_fixed_location()ApplicationVertex.has_splitterApplicationVertex.machine_verticesApplicationVertex.n_atomsApplicationVertex.remember_machine_vertex()ApplicationVertex.reset()ApplicationVertex.round_n_atoms()ApplicationVertex.set_max_atoms_per_dimension_per_core()ApplicationVertex.splitter
ApplicationVirtualVertexFPGAConnection
- pacman.model.graphs.common package
- pacman.model.graphs.machine package
- Module contents
AbstractSDRAMPartitionConstantSDRAMMachinePartitionDestinationSegmentedSDRAMMachinePartitionDestinationSegmentedSDRAMMachinePartition.add_edge()DestinationSegmentedSDRAMMachinePartition.get_sdram_base_address_for()DestinationSegmentedSDRAMMachinePartition.get_sdram_size_of_region_for()DestinationSegmentedSDRAMMachinePartition.sdram_base_addressDestinationSegmentedSDRAMMachinePartition.total_sdram_requirements()
MachineEdgeMachineFPGAVertexMachineSpiNNakerLinkVertexMachineSpiNNakerLinkVertex.board_addressMachineSpiNNakerLinkVertex.get_link_data()MachineSpiNNakerLinkVertex.incomingMachineSpiNNakerLinkVertex.linked_chip_coordinatesMachineSpiNNakerLinkVertex.outgoingMachineSpiNNakerLinkVertex.outgoing_keys_and_masks()MachineSpiNNakerLinkVertex.sdram_requiredMachineSpiNNakerLinkVertex.spinnaker_link_id
MachineVertexMulticastEdgePartitionSDRAMMachineEdgeSimpleMachineVertexSourceSegmentedSDRAMMachinePartitionSourceSegmentedSDRAMMachinePartition.add_edge()SourceSegmentedSDRAMMachinePartition.get_sdram_base_address_for()SourceSegmentedSDRAMMachinePartition.get_sdram_size_of_region_for()SourceSegmentedSDRAMMachinePartition.is_sdram_base_address_defined()SourceSegmentedSDRAMMachinePartition.sdram_base_addressSourceSegmentedSDRAMMachinePartition.total_sdram_requirements()
- Module contents
Module contents¶
- class pacman.model.graphs.AbstractEdge¶
Bases:
Generic[V]A directed edge in a graph between two vertices.
- abstract property post_vertex: V¶
The vertex at the end of the edge.
- Return type:
- abstract property pre_vertex: V¶
The vertex at the start of the edge.
- Return type:
- class pacman.model.graphs.AbstractEdgePartition(identifier: str, allowed_edge_types: Type[E] | Tuple[Type[E], ...])¶
Bases:
Generic[E]A collection of edges which start at a single vertex which have the same semantics and so can share a single key or block of SDRAM (depending on edge type).
- Parameters:
- add_edge(edge: E)[source]¶
Add an edge to the edge partition.
- Parameters:
edge (AbstractEdge) – the edge to add
- Raises:
PacmanInvalidParameterException – If the edge does not belong in this edge partition
- property edges: Collection[E]¶
The edges in this edge partition.
Note
The order in which the edges are added is preserved for when they are requested later. If not, please talk to the software team.
- Return type:
iterable(AbstractEdge)
- abstract property pre_vertices: Collection[AbstractVertex]¶
The vertices associated with this partition.
Note
Most edge partitions will be
AbstractSingleSourcePartitionand therefore provide thepre_vertexmethod.- Return type:
iterable(AbstractVertex)
- class pacman.model.graphs.AbstractMultiplePartition(pre_vertices: Collection[V], identifier: str, allowed_edge_types: Type[E] | Tuple[Type[E], ...])¶
Bases:
AbstractEdgePartition[E],Generic[V,E]An edge partition that has multiple source vertices.
- Parameters:
- add_edge(edge: E)[source]¶
Add an edge to the edge partition.
- Parameters:
edge (AbstractEdge) – the edge to add
- Raises:
PacmanInvalidParameterException – If the edge does not belong in this edge partition
- property pre_vertices: Collection[V]¶
The vertices associated with this partition.
Note
Most edge partitions will be
AbstractSingleSourcePartitionand therefore provide thepre_vertexmethod.- Return type:
iterable(AbstractVertex)
- class pacman.model.graphs.AbstractSingleSourcePartition(pre_vertex: V, identifier: str, allowed_edge_types: Type[E] | Tuple[Type[E], ...])¶
Bases:
AbstractEdgePartition,Generic[V,E]An edge partition that has a single source vertex.
- Parameters:
- add_edge(edge: E)[source]¶
Add an edge to the edge partition.
- Parameters:
edge (AbstractEdge) – the edge to add
- Raises:
PacmanInvalidParameterException – If the edge does not belong in this edge partition
- property pre_vertex: V¶
The vertex at which all edges in this outgoing edge partition start.
- Return type:
- property pre_vertices: Sequence[V]¶
The vertices associated with this partition.
Note
Most edge partitions will be
AbstractSingleSourcePartitionand therefore provide thepre_vertexmethod.- Return type:
iterable(AbstractVertex)
- class pacman.model.graphs.AbstractSupportsSDRAMEdges¶
Bases:
objectMarks a machine vertex that can have SDRAM edges attached to it.
- abstract sdram_requirement(sdram_machine_edge: SDRAMMachineEdge) int[source]¶
Asks a machine vertex for the SDRAM requirement it needs.
- Parameters:
sdram_machine_edge (SDRAMMachineEdge) – The SDRAM edge in question
- Returns:
The size in bytes this vertex needs for the SDRAM edge.
- Return type:
int (most likely a multiple of 4)
- class pacman.model.graphs.AbstractVertex(label: str | None = None)¶
Bases:
objectA vertex in a graph.
- Parameters:
label (str) – The optional name of the vertex
- get_fixed_location() ChipAndCore | None[source]¶
The x, y and possibly p the vertex must be placed on.
Typically None! Does not have the value of a normal placements.
Used instead of ChipAndCoreConstraint.
- Return type:
None or ChipAndCore
- property label: str | None¶
The current label to the vertex.
This label could change when the vertex is added to the graph.
- Return type:
- set_added_to_graph() None[source]¶
Records that the vertex has been added to a graph.
- Raises:
PacmanConfigurationException – If there is an attempt to add the same vertex more than once
- set_fixed_location(x: int, y: int, p: int | None = None)[source]¶
Set the location where the vertex must be placed.
Note
If called, must be called prior to the placement algorithms.
- Parameters:
- Raises:
PacmanConfigurationException – If a fixed location has already been set to a different location.
- set_label(label: str)[source]¶
Changes the label for a vertex not yet added to a graph.
- Parameters:
label (str) – new value for the label
- Raises:
PacmanConfigurationException – If there is an attempt to change the label once the vertex has been added to a graph
- class pacman.model.graphs.AbstractVirtual¶
Bases:
objectA vertex which exists outside of the machine, allowing a graph to formally participate in I/O.
Note
Everything that is an instance of
AbstractVirtualis also an instance ofAbstractVertex.- abstract property board_address: str | None¶
The IP address of the board to which the device is connected, or
Nonefor the boot board, or when using linked chip coordinates.- Return type:
str or None
- abstract get_link_data(machine: Machine) AbstractLinkData[source]¶
Get link data from the machine.
- Parameters:
machine (Machine) – The machine to get the data from
- Return type:
- abstract property linked_chip_coordinates: XY | None¶
The coordinates of the chip to which the device is connected, or
Nonefor the boot board, or when using a board address.
- abstract outgoing_keys_and_masks() List[BaseKeyAndMask] | None[source]¶
Get the keys sent by the device or None if there aren’t any explicitly defined.
- Return type:
list(BaseKeyAndMask) or None