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.graph.application.application_vertex.ApplicationVertex) – the application vertex at the start of the edge
  • post_vertex (pacman.model.graph.application.application_vertex.ApplicationVertex) – the application vertex at the end of the edge
  • traffic_type (pacman.model.graph.edge_traffic_type.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.graph.machine.abstract_machine_vertex.impl.MachineVertex) – The machine vertex at the start of the edge
  • post_vertex (pacman.model.graph.machine.abstract_machine_vertex.impl.MachineVertex) – The machine vertex at the end of the edge
  • label (str) – label of the edge
Returns:

The created machine edge

Return type:

pacman.model.graph.machine.machine_edge.MachineEdge

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:py:class:pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType

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_vertex.AbstractFPGAVertex

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 – The slice of atoms that the machine vertex will cover
  • resources_required – the resources used by the machine vertex
  • constraints – 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

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 (pacman.model.graph.slice.Slice) – the low value of atoms to calculate resources from
Returns:a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource
Return type:pacman.model.resources.ResourceContainer
Raises:None – this method does not raise any known exception
n_atoms

The number of atoms in the vertex

Returns:The number of atoms
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_vertex module

class pacman.model.graphs.application.application_vertex.ApplicationVertex(label=None, constraints=None, max_atoms_per_core=9223372036854775807)[source]

Bases: pacman.model.graphs.common.constrained_object.ConstrainedObject, 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:
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 – The slice of atoms that the machine vertex will cover
  • resources_required – the resources used by the machine vertex
  • constraints – 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 (pacman.model.graph.slice.Slice) – the low value of atoms to calculate resources from
Returns:a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource
Return type:pacman.model.resources.ResourceContainer
Raises:None – this method does not raise any known exception
label

The label of the vertex

Return type:str
n_atoms

The number of atoms in the vertex

Returns:The number of atoms
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.graph.application.application_vertex.ApplicationVertex) – the application vertex at the start of the edge
  • post_vertex (pacman.model.graph.application.application_vertex.ApplicationVertex) – the application vertex at the end of the edge
  • traffic_type (pacman.model.graph.edge_traffic_type.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.graph.machine.abstract_machine_vertex.impl.MachineVertex) – The machine vertex at the start of the edge
  • post_vertex (pacman.model.graph.machine.abstract_machine_vertex.impl.MachineVertex) – The machine vertex at the end of the edge
  • label (str) – label of the edge
Returns:

The created machine edge

Return type:

pacman.model.graph.machine.machine_edge.MachineEdge

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:py:class:pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType
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_vertex.AbstractFPGAVertex

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 – The slice of atoms that the machine vertex will cover
  • resources_required – the resources used by the machine vertex
  • constraints – 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

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 (pacman.model.graph.slice.Slice) – the low value of atoms to calculate resources from
Returns:a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource
Return type:pacman.model.resources.ResourceContainer
Raises:None – this method does not raise any known exception
n_atoms

The number of atoms in the vertex

Returns:The number of atoms
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.common.constrained_object.ConstrainedObject, 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:
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 – The slice of atoms that the machine vertex will cover
  • resources_required – the resources used by the machine vertex
  • constraints – 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 (pacman.model.graph.slice.Slice) – the low value of atoms to calculate resources from
Returns:a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource
Return type:pacman.model.resources.ResourceContainer
Raises:None – this method does not raise any known exception
label

The label of the vertex

Return type:str
n_atoms

The number of atoms in the vertex

Returns:The number of atoms
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_vertex.AbstractSpiNNakerLinkVertex

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 – The slice of atoms that the machine vertex will cover
  • resources_required – the resources used by the machine vertex
  • constraints – 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 (pacman.model.graph.slice.Slice) – the low value of atoms to calculate resources from
Returns:a Resource container that contains a CPUCyclesPerTickResource, DTCMResource and SDRAMResource
Return type:pacman.model.resources.ResourceContainer
Raises:None – this method does not raise any known exception
n_atoms

The number of atoms in the vertex

Returns:The number of atoms
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

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