Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/max_cores_per_chip' into max_cor…
Browse files Browse the repository at this point in the history
…es_per_chip
  • Loading branch information
Christian-B committed Nov 12, 2019
2 parents eeeae7f + 2d186ed commit 5099c5d
Show file tree
Hide file tree
Showing 65 changed files with 1,203 additions and 564 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ script:
- support/rat.sh run
# Docs
- support/travis-sphinx.sh html -T -E -b html -d _build/doctrees-readthedocsdirhtml -D language=en . _build/html
- support/travis-sphinx.sh json -T -b json -d _build/doctrees-json -D language=en . _build/json
- support/travis-sphinx.sh singlehtml -T -b singlehtml -d _build/doctrees-readthedocssinglehtmllocalmedia -D language=en . _build/localmedia
- support/travis-sphinx.sh json -q -T -b json -d _build/doctrees-json -D language=en . _build/json
- support/travis-sphinx.sh singlehtml -q -T -b singlehtml -d _build/doctrees-readthedocssinglehtmllocalmedia -D language=en . _build/localmedia

after_success:
- cd $TRAVIS_BUILD_DIR
Expand Down
3 changes: 2 additions & 1 deletion doc/source/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@

*.rst
!index.rst
!modules.rst
!modules.rst
_build
41 changes: 25 additions & 16 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,16 @@
'sphinx.ext.intersphinx'
]

intersphinx_mapping = {'spinn_machine':
('http://spinnmachine.readthedocs.org/en/latest/',
None),
'spinn_storage_handlers':
('http://spinnmachine.readthedocs.io/en/latest/',
None),
'spinnman':
('http://spinnman.readthedocs.io/en/latest/',
None),
'pacman': ('http://pacman.readthedocs.io/en/latest/',
None),
'data_specification':
('http://dataspecification.readthedocs.io'
'/en/latest/', None),
}
intersphinx_mapping = {
'spinn_machine': (
'https://spinnmachine.readthedocs.io/en/latest/', None),
'spinnman': (
'https://spinnman.readthedocs.io/en/latest/', None),
'pacman': (
'https://pacman.readthedocs.io/en/latest/', None),
'data_specification': (
'https://dataspecification.readthedocs.io/en/latest/', None),
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -373,4 +368,18 @@
if (os.path.isfile(f) and f.endswith(
".rst") and f != "index.rst" and f != "modules.rst"):
os.remove(f)
apidoc.main([None, '-o', ".", "../../spinn_front_end_common"])
apidoc.main([None, '-o', ".", "../../spinn_front_end_common",
"../../spinn_front_end_common/abstract_models/impl/[a-z]*.py",
"../../spinn_front_end_common/abstract_models/a*.py",
"../../spinn_front_end_common/interface/buffer_management/r*.py",
"../../spinn_front_end_common/interface/buffer_management/buffer_manager.py",
"../../spinn_front_end_common/interface/buffer_management/*/[a-z]*.py",
"../../spinn_front_end_common/interface/[dips]*/[a-z]*.py",
"../../spinn_front_end_common/utilities/[a-z]*/[a-df-z]*.py",
"../../spinn_front_end_common/utilities/fa*.py",
"../../spinn_front_end_common/utilities/si*.py",
"../../spinn_front_end_common/utilities/math_constants.py",
"../../spinn_front_end_common/utilities/utility_objs/exe*.py",
"../../spinn_front_end_common/utilities/utility_objs/ext*/[a-z]*.py",
"../../spinn_front_end_common/utility_models/[a-z]*.py"
])
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Contents:
.. toctree::
:maxdepth: 4

spinn_front_end_common
modules


Indices and tables
Expand Down
4 changes: 2 additions & 2 deletions spinn_front_end_common/abstract_models/abstract_can_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

@add_metaclass(AbstractBase)
class AbstractCanReset(object):
""" Indicates an object that can be reset to time 0
""" Indicates an object that can be reset to time 0.
"""

@abstractmethod
def reset_to_first_timestep(self):
""" Reset the object to first time step
""" Reset the object to first time step.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ def generate_data_specification(self, spec, placement):
""" Generate a data specification.
:param spec: The data specification to write to
:type spec:\
:py:class:`~data_specification.DataSpecificationGenerator`
:param placement: the placement object this spec is associated with
:type spec: Placement
:type spec: ~data_specification.DataSpecificationGenerator
:param placement: the placement the vertex is located at
:type placement: ~pacman.model.placements.Placement
:rtype: None
"""
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ def get_binary_file_name(self):
def get_binary_start_type(self):
""" Get the start type of the binary to be run.
:rtype:\
:py:class:`~spinn_front_end_common.utilities.utility_objs.ExecutableType`
:rtype: ~spinn_front_end_common.utilities.utility_objs.ExecutableType
"""
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def extend_allocation(self, new_total_run_time):
:param new_total_run_time: The total run time that is now required\
starting from when the machine was first allocated
:type new_total_run_time: float
"""

@abstractmethod
def close(self):
""" Indicate that the use of the machine is complete
""" Indicate that the use of the machine is complete.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def get_incoming_partition_constraints(self, partition):
:param partition: An partition that goes in to this vertex
:type partition:\
:py:class:`~pacman.utilities.utility_objs.OutgoingPartition`
~pacman.model.graphs.AbstractOutgoingEdgePartition
:return: A list of constraints
:rtype: \
list(:py:class:`~pacman.model.constraints.AbstractConstraint`)
:rtype: list(~pacman.model.constraints.AbstractConstraint)
"""
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def routing_key_partition_atom_mapping(self, routing_info, partition):
""" Returns a list of atom to key mapping.
:param routing_info: the routing info object to consider
:type routing_info: ~pacman.model.routing_info.RoutingInfo
:param partition: the routing partition to handle.
:type partition: ~pacman.model.graphs.AbstractOutgoingEdgePartition
:return: a iterable of tuples of atom IDs to keys.
:rtype: iterable(tuple(int,int))
"""
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ def get_n_keys_for_partition(self, partition, graph_mapper):
""" Get the number of keys required by the given partition of edges.
:param partition: An partition that comes out of this vertex
:type partition:\
:py:class:`~pacman.utilities.utility_objs.OutgoingPartition`
:type partition: ~pacman.model.graphs.AbstractOutgoingEdgePartition
:param graph_mapper: A mapper between the graphs
:type graph_mapper: :py:class:`~pacman.model.graph.GraphMapper`
:return: A list of constraints
:rtype: \
list(:py:class:`~pacman.model.constraints.AbstractConstraint`)
:rtype: list(~pacman.model.constraints.AbstractConstraint)
"""
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_outgoing_partition_constraints(self, partition):
this vertex.
:param partition: An edge that comes out of this vertex
:type partition: ~pacman.model.graphs.AbstractOutgoingEdgePartition
:return: A list of constraints
:rtype: \
list(:py:class:`~pacman.model.constraints.AbstractConstraint`)
:rtype: list(~pacman.model.constraints.AbstractConstraint)
"""
2 changes: 2 additions & 0 deletions spinn_front_end_common/abstract_models/abstract_recordable.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ class AbstractRecordable(object):
@abstractmethod
def is_recording(self):
""" Deduce if the recorder is actually recording
:rtype: bool
"""
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AbstractRewritesDataSpecification(object):
def regenerate_data_specification(self, spec, placement):
""" Regenerate the data specification, only generating regions that\
have changed and need to be reloaded
:param spec: Where to write the regenerated spec
:type spec: ~data_specification.DataSpecificationGenerator
:param placement: Where are we regenerating for?
:type placement: ~pacman.model.placements.Placement
"""

@abstractmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,23 @@ class AbstractSendMeMulticastCommandsVertex(object):
@abstractproperty
def start_resume_commands(self):
""" The commands needed when starting or resuming simulation
:rtype: \
iterable(~spinn_front_end_common.utility_models.MultiCastCommand)
"""

@abstractproperty
def pause_stop_commands(self):
""" The commands needed when pausing or stopping simulation
:rtype: \
iterable(~spinn_front_end_common.utility_models.MultiCastCommand)
"""

@abstractproperty
def timed_commands(self):
""" The commands to be sent at given times in the simulation
:rtype: \
iterable(~spinn_front_end_common.utility_models.MultiCastCommand)
"""
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ class AbstractSupportsDatabaseInjection(object):
@abstractproperty
def is_in_injection_mode(self):
""" Whether this vertex is actually in injection mode.
:rtype: bool
"""
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@

@add_metaclass(AbstractBase)
class AbstractUsesMemoryIO(object):
""" Indicates that the class will write data using the MemoryIO interface
""" Indicates that the class will write data using the \
:py:class:`~spinnman.utilities.io.MemoryIO` interface.
"""

@abstractmethod
def get_memory_io_data_size(self):
""" Get the size of the data area to allocate to this vertex
""" Get the size of the data area to allocate for this vertex.
:return: The size of the data area in bytes
:rtype: int
Expand All @@ -34,8 +35,10 @@ def get_memory_io_data_size(self):
def write_data_to_memory_io(self, memory, tag):
""" Write the data to the given memory object
:param memory: The memory to write to
:type memory: :py:class:`~spinnman.utilities.io.memory_io.MemoryIO`
:param memory: \
The memory to write to (and handle to use to do the write)
:type memory: ~spinnman.utilities.io.MemoryIO
:param tag: The tag given to the allocated memory
:type tag: int
:rtype: None
"""
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@ class AbstractVertexWithEdgeToDependentVertices(object):
@abstractmethod
def dependent_vertices(self):
""" Return the vertices which this vertex depends upon
:rtype: iterable(~pacman.model.graphs.application.ApplicationVertex)
"""

@abstractmethod
def edge_partition_identifiers_for_dependent_vertex(self, vertex):
""" Return the dependent edge identifiers for this vertex
""" Return the dependent edge identifiers for a particular dependent\
vertex.
:param vertex:
:type vertex: ~pacman.model.graphs.application.ApplicationVertex
:rtype: iterable(str)
"""
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@

@add_metaclass(AbstractBase)
class MachineAllocationController(AbstractMachineAllocationController):
""" How to manage the allocation of a machine so that it gets cleaned up\
neatly when the script dies.
"""
__slots__ = [
# boolean flag for telling this thread when the system has ended
#: boolean flag for telling this thread when the system has ended
"_exited"
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

@supports_injection
class MachineDataSpecableVertex(AbstractGeneratesDataSpecification):
""" Support for a vertex that simplifies generating a data specification.
"""
__slots__ = ()

@inject_items({
Expand All @@ -41,6 +43,15 @@ class MachineDataSpecableVertex(AbstractGeneratesDataSpecification):
def generate_data_specification(
self, spec, placement, machine_graph, routing_info, tags,
machine_time_step, time_scale_factor):
"""
:param machine_graph: (Injected)
:type machine_graph: ~pacman.model.graphs.machine.MachineGraph
:param routing_info: (Injected)
:type routing_info: ~pacman.model.routing_info.RoutingInfo
:param tags: (Injected)
:param machine_time_step: (Injected)
:param time_scale_factor: (Injected)
"""
# pylint: disable=too-many-arguments, arguments-differ
iptags = tags.get_ip_tags_for_vertex(placement.vertex)
reverse_iptags = tags.get_reverse_ip_tags_for_vertex(placement.vertex)
Expand All @@ -54,14 +65,22 @@ def generate_machine_data_specification(
reverse_iptags, machine_time_step, time_scale_factor):
"""
:param spec: The data specification to write into.
:type spec:\
:py:class:`~data_specification.DataSpecificationGenerator`
:type spec: ~data_specification.DataSpecificationGenerator
:param placement: Where this node is on the SpiNNaker machine.
:type placement: ~pacman.model.placements.Placement
:param machine_graph: The graph containing this node.
:param routing_info:
:param iptags:
:param reverse_iptags:
:param machine_time_step:
:param time_step_factor:
:type machine_graph: ~pacman.model.graphs.machine.MachineGraph
:param routing_info: The routing info.
:type routing_info: ~pacman.model.routing_info.RoutingInfo
:param iptags: The (forward) IP tags for the vertex, if any
:type iptags: iterable(~spinn_machine.tags.IPTag) or None
:param reverse_iptags: The reverse IP tags for the vertex, if any
:type reverse_iptags: \
iterable(~spinn_machine.tags.ReverseIPTag) or None
:param machine_time_step: The machine time step
:type machine_time_step: int
:param time_scale_factor: The time step scaling factor
:type time_scale_factor: int
:rtype: None
"""
# pylint: disable=too-many-arguments
Loading

0 comments on commit 5099c5d

Please sign in to comment.