pacman.model.graphs.application package¶
Submodules¶
pacman.model.graphs.application.application_edge module¶
-
class
pacman.model.graphs.application.application_edge.
ApplicationEdge
(pre_vertex, post_vertex, traffic_type=<EdgeTrafficType.MULTICAST: 1>, label=None, machine_edge_type=<class 'pacman.model.graphs.machine.machine_edge.MachineEdge'>)[source]¶ Bases:
pacman.model.graphs.abstract_edge.AbstractEdge
A simple implementation of an application edge.
Parameters: - pre_vertex (
pacman.model.graphs.application.ApplicationVertex
) – the application vertex at the start of the edge - post_vertex (
pacman.model.graphs.application.ApplicationVertex
) – the application vertex at the end of the edge - traffic_type (
pacman.model.graphs.common.EdgeTrafficType
) – The type of the traffic on the edge - label (str) – The name of the edge
-
create_machine_edge
(pre_vertex, post_vertex, label)[source]¶ Create a machine edge between two machine vertices
Parameters: - pre_vertex (
pacman.model.graphs.machine.MachineVertex
) – The machine vertex at the start of the edge - post_vertex (
pacman.model.graphs.machine.MachineVertex
) – The machine vertex at the end of the edge - label (str) – label of the edge
Returns: The created machine edge
Return type: - pre_vertex (
-
label
¶ The label of the edge
Returns: The label Return type: str Raises: None – Raises no known exceptions
-
post_vertex
¶ The vertex at the end of the edge
Return type: pacman.model.graphs.abstract_vertex.AbstractVertex
-
pre_vertex
¶ The vertex at the start of the edge
Return type: pacman.model.graphs.abstract_vertex.AbstractVertex
-
traffic_type
¶ The traffic type of the edge
Return type: pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType
- pre_vertex (
pacman.model.graphs.application.application_fpga_vertex module¶
-
class
pacman.model.graphs.application.application_fpga_vertex.
ApplicationFPGAVertex
(n_atoms, fpga_id, fpga_link_id, board_address=None, label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,pacman.model.graphs.abstract_fpga.AbstractFPGA
A virtual vertex on an FPGA link.
-
board_address
¶ The IP address of the board to which the device is connected, or None for the boot board.
Return type: str
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
fpga_id
¶ The ID of the FPGA to which the vertex is connected.
Return type: int
-
fpga_link_id
¶ The link of the FPGA to which the vertex is connected.
Return type: int
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
set_virtual_chip_coordinates
(virtual_chip_x, virtual_chip_y)[source]¶ Set the details of the virtual chip that has been added to the machine for this vertex.
Parameters: - virtual_chip_x – The x-coordinate of the added chip
- virtual_chip_y – The y-coordinate of the added chip
-
virtual_chip_x
¶ The x-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
virtual_chip_y
¶ The y-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
pacman.model.graphs.application.application_graph module¶
-
class
pacman.model.graphs.application.application_graph.
ApplicationGraph
(label)[source]¶ Bases:
pacman.model.graphs.impl.graph.Graph
An application-level abstraction of a graph.
pacman.model.graphs.application.application_outgoing_edge_partition module¶
-
class
pacman.model.graphs.application.application_outgoing_edge_partition.
ApplicationOutgoingEdgePartition
(identifier, constraints=None, label=None)[source]¶ Bases:
pacman.model.graphs.impl.outgoing_edge_partition.OutgoingEdgePartition
Edge partition for the application graph.
pacman.model.graphs.application.application_spinnaker_link_vertex module¶
-
class
pacman.model.graphs.application.application_spinnaker_link_vertex.
ApplicationSpiNNakerLinkVertex
(n_atoms, spinnaker_link_id, board_address=None, label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,pacman.model.graphs.abstract_spinnaker_link.AbstractSpiNNakerLink
A virtual vertex on a SpiNNaker Link.
-
board_address
¶ The IP address of the board to which the device is connected, or None for the boot board.
Return type: str
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
set_virtual_chip_coordinates
(virtual_chip_x, virtual_chip_y)[source]¶ Set the details of the virtual chip that has been added to the machine for this vertex.
Parameters: - virtual_chip_x – The x-coordinate of the added chip
- virtual_chip_y – The y-coordinate of the added chip
-
spinnaker_link_id
¶ The SpiNNaker Link that the vertex is connected to.
-
virtual_chip_x
¶ The x-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
virtual_chip_y
¶ The y-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
pacman.model.graphs.application.application_vertex module¶
-
class
pacman.model.graphs.application.application_vertex.
ApplicationVertex
(label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.abstract_vertex.AbstractVertex
A vertex that can be broken down into a number of smaller vertices based on the resources that the vertex requires.
Parameters: - label (str) – The optional name of the vertex
- constraints (iterable(AbstractConstraint)) – The optional initial constraints of the vertex
- max_atoms_per_core (int) – the max number of atoms that can be placed on a core, used in partitioning
Raises: pacman.exceptions.PacmanInvalidParameterException –
- If one of the constraints is not valid
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
Module contents¶
-
class
pacman.model.graphs.application.
ApplicationEdge
(pre_vertex, post_vertex, traffic_type=<EdgeTrafficType.MULTICAST: 1>, label=None, machine_edge_type=<class 'pacman.model.graphs.machine.machine_edge.MachineEdge'>)[source]¶ Bases:
pacman.model.graphs.abstract_edge.AbstractEdge
A simple implementation of an application edge.
Parameters: - pre_vertex (
pacman.model.graphs.application.ApplicationVertex
) – the application vertex at the start of the edge - post_vertex (
pacman.model.graphs.application.ApplicationVertex
) – the application vertex at the end of the edge - traffic_type (
pacman.model.graphs.common.EdgeTrafficType
) – The type of the traffic on the edge - label (str) – The name of the edge
-
create_machine_edge
(pre_vertex, post_vertex, label)[source]¶ Create a machine edge between two machine vertices
Parameters: - pre_vertex (
pacman.model.graphs.machine.MachineVertex
) – The machine vertex at the start of the edge - post_vertex (
pacman.model.graphs.machine.MachineVertex
) – The machine vertex at the end of the edge - label (str) – label of the edge
Returns: The created machine edge
Return type: - pre_vertex (
-
label
¶ The label of the edge
Returns: The label Return type: str Raises: None – Raises no known exceptions
-
post_vertex
¶ The vertex at the end of the edge
Return type: pacman.model.graphs.abstract_vertex.AbstractVertex
-
pre_vertex
¶ The vertex at the start of the edge
Return type: pacman.model.graphs.abstract_vertex.AbstractVertex
-
traffic_type
¶ The traffic type of the edge
Return type: pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType
- pre_vertex (
-
class
pacman.model.graphs.application.
ApplicationFPGAVertex
(n_atoms, fpga_id, fpga_link_id, board_address=None, label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,pacman.model.graphs.abstract_fpga.AbstractFPGA
A virtual vertex on an FPGA link.
-
board_address
¶ The IP address of the board to which the device is connected, or None for the boot board.
Return type: str
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
fpga_id
¶ The ID of the FPGA to which the vertex is connected.
Return type: int
-
fpga_link_id
¶ The link of the FPGA to which the vertex is connected.
Return type: int
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
set_virtual_chip_coordinates
(virtual_chip_x, virtual_chip_y)[source]¶ Set the details of the virtual chip that has been added to the machine for this vertex.
Parameters: - virtual_chip_x – The x-coordinate of the added chip
- virtual_chip_y – The y-coordinate of the added chip
-
virtual_chip_x
¶ The x-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
virtual_chip_y
¶ The y-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
-
class
pacman.model.graphs.application.
ApplicationGraph
(label)[source]¶ Bases:
pacman.model.graphs.impl.graph.Graph
An application-level abstraction of a graph.
-
class
pacman.model.graphs.application.
ApplicationOutgoingEdgePartition
(identifier, constraints=None, label=None)[source]¶ Bases:
pacman.model.graphs.impl.outgoing_edge_partition.OutgoingEdgePartition
Edge partition for the application graph.
-
class
pacman.model.graphs.application.
ApplicationVertex
(label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.abstract_vertex.AbstractVertex
A vertex that can be broken down into a number of smaller vertices based on the resources that the vertex requires.
Parameters: - label (str) – The optional name of the vertex
- constraints (iterable(AbstractConstraint)) – The optional initial constraints of the vertex
- max_atoms_per_core (int) – the max number of atoms that can be placed on a core, used in partitioning
Raises: pacman.exceptions.PacmanInvalidParameterException –
- If one of the constraints is not valid
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
class
pacman.model.graphs.application.
ApplicationSpiNNakerLinkVertex
(n_atoms, spinnaker_link_id, board_address=None, label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]¶ Bases:
pacman.model.graphs.application.application_vertex.ApplicationVertex
,pacman.model.graphs.abstract_spinnaker_link.AbstractSpiNNakerLink
A virtual vertex on a SpiNNaker Link.
-
board_address
¶ The IP address of the board to which the device is connected, or None for the boot board.
Return type: str
-
create_machine_vertex
(vertex_slice, resources_required, label=None, constraints=None)[source]¶ Create a machine vertex from this application vertex
Parameters: - vertex_slice (Slice) – The slice of atoms that the machine vertex will cover
- resources_required (ResourceContainer) – the resources used by the machine vertex
- label (str or None) – human readable label for the machine vertex
- constraints (iterable(AbstractConstraint)) – Constraints to be passed on to the machine vertex
-
get_resources_used_by_atoms
(vertex_slice)[source]¶ Get the separate resource requirements for a range of atoms
Parameters: vertex_slice (Slice) – the low value of atoms to calculate resources from Returns: a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource Return type: ResourceContainer Raises: None – this method does not raise any known exception
-
n_atoms
¶ The number of atoms in the vertex
Return type: int
-
set_virtual_chip_coordinates
(virtual_chip_x, virtual_chip_y)[source]¶ Set the details of the virtual chip that has been added to the machine for this vertex.
Parameters: - virtual_chip_x – The x-coordinate of the added chip
- virtual_chip_y – The y-coordinate of the added chip
-
spinnaker_link_id
¶ The SpiNNaker Link that the vertex is connected to.
-
virtual_chip_x
¶ The x-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-
virtual_chip_y
¶ The y-coordinate of the virtual chip where this vertex is to be placed.
Return type: int
-