Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce overhead #436

Merged
merged 190 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from 174 commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
d8b3ff1
Remove outgoing_partitions_by_edge
rowleya Aug 20, 2021
f569de0
Remove incoming_edges_by_partition_name
rowleya Aug 20, 2021
615cd42
Remove more machine graph properties
rowleya Aug 23, 2021
53a39b9
Another one bites the dust
rowleya Aug 24, 2021
8a569bf
Make sure everything is copied
rowleya Aug 24, 2021
941bce2
Check for containership correctly
rowleya Aug 24, 2021
9a74163
See if this makes things faster
rowleya Aug 31, 2021
8e2c93f
Tidy up some things
rowleya Aug 31, 2021
27e1331
Simplify partitioning
rowleya Aug 31, 2021
3486e05
Flake 8
rowleya Aug 31, 2021
d8337bd
Return lists
rowleya Aug 31, 2021
0684535
Bring back the concentric ring implementation
rowleya Sep 1, 2021
deea80a
Merge branch 'master' into reduce_overhead
rowleya Sep 1, 2021
0e7b4f5
Reduce data structure size (and fix tests)
rowleya Sep 2, 2021
dd62b62
Merge branch 'master' into reduce_overhead
rowleya Oct 5, 2021
5320c39
Starting to simplify more
rowleya Oct 21, 2021
31db93a
Refactor splitting to not produce a machine graph and only use fixed
rowleya Nov 5, 2021
6012676
Merge branch 'master' into reduce_overhead
rowleya Nov 5, 2021
ec6c320
Simplify
rowleya Nov 5, 2021
2b88e6e
Get same chip groups to make things easier later
rowleya Nov 8, 2021
e053e97
Fix application placer
rowleya Nov 9, 2021
5ce1d79
Repair virtual
rowleya Nov 9, 2021
bf6dfa5
Flake8
rowleya Nov 9, 2021
d6601c8
Fix
rowleya Nov 9, 2021
0d6adb8
Working Key allocator (but not all allocators work)
rowleya Nov 12, 2021
9bf8218
Merge branch 'master' into reduce_overhead
rowleya Nov 19, 2021
2a0dbf3
Fix one test and skip others
rowleya Nov 19, 2021
ab5cbb6
Flake8
rowleya Nov 19, 2021
cbbc16c
Fix for now
rowleya Nov 22, 2021
10597f2
Simplify
rowleya Nov 26, 2021
18a3f10
Application Edges don't have machine edges any more
rowleya Nov 26, 2021
6f8c5fa
Fix test for removal
rowleya Nov 26, 2021
46e91b8
Application vertices don't need to hold these or do extra checks
rowleya Nov 26, 2021
4d3a013
Add a parameter to the splitter
rowleya Nov 26, 2021
062ed11
Fix
rowleya Nov 26, 2021
afbe877
Fix imports
rowleya Nov 26, 2021
61519ee
Merge branch 'master' into reduce_overhead
rowleya Nov 29, 2021
fb5710f
Fix imports
rowleya Nov 29, 2021
cac8937
Fix
rowleya Nov 29, 2021
d252628
flake8
rowleya Nov 29, 2021
b24295f
Add the idea of system placements
rowleya Dec 1, 2021
ce876ff
Refactor to keep track of placements by chip as well
rowleya Dec 3, 2021
e3abdbf
Make it work with system placements
rowleya Dec 3, 2021
109be2f
Remove unused
rowleya Dec 3, 2021
d674c36
Remove unused
rowleya Dec 3, 2021
5c2e54e
Make better representation
rowleya Dec 6, 2021
46a7997
Fix for changes
rowleya Dec 6, 2021
6bb971e
Add application router
rowleya Dec 6, 2021
3cbd611
Accept placement constraint
rowleya Dec 7, 2021
3d429ae
Fix
rowleya Dec 7, 2021
0ada702
Ensure it works when vertices are not sending too
rowleya Dec 7, 2021
060ab26
Simplify tag allocation
rowleya Dec 8, 2021
5577689
Fix tests
rowleya Dec 8, 2021
23df151
Fix
rowleya Dec 8, 2021
557e180
Allow a disconnected edge partition to have edges added to it
rowleya Dec 17, 2021
e4f185e
Make some things utilities for use elsewhere
rowleya Dec 17, 2021
68b4500
Add a useful function
rowleya Dec 17, 2021
671ee4b
Change interface again!
rowleya Dec 17, 2021
9430df9
Fix to work and fix test
rowleya Dec 17, 2021
fb67644
Update the application router again after some analysis
rowleya Jan 7, 2022
69bc413
Debug aids
rowleya Jan 12, 2022
775008f
More refactoring and testing
rowleya Jan 12, 2022
54c6389
Non-recursive version
rowleya Jan 12, 2022
a5453f1
No need to order edges any more
rowleya Jan 12, 2022
3da0d6e
Don't really need to cache
rowleya Jan 12, 2022
12ecb0a
Make sure splitters are used
rowleya Jan 12, 2022
296d667
Merge branch 'master' into reduce_overhead
rowleya Jan 12, 2022
a0c9a69
Flake8
rowleya Jan 12, 2022
a30d7cc
Check for placements already made
rowleya Jan 13, 2022
8918c2d
Make less likely to fail and test
rowleya Jan 13, 2022
2a8e47a
Remove import
rowleya Jan 13, 2022
70a9c9d
Try this
rowleya Jan 13, 2022
fa469ac
Store placements then do them all at once
rowleya Jan 13, 2022
bd66434
More simplification
rowleya Jan 13, 2022
6b6b520
Route around down chips and links
rowleya Jan 14, 2022
ddaf4dc
Add some debugging
rowleya Jan 19, 2022
abdd977
Fix printing
rowleya Jan 20, 2022
f19bda4
Probably doesn't change anything but...
rowleya Jan 20, 2022
7de6fe8
Add more debug information
rowleya Jan 20, 2022
0106b72
More debug!
rowleya Jan 20, 2022
0c6c96e
More debug
rowleya Jan 20, 2022
01f20b6
Debug more
rowleya Jan 20, 2022
37e531d
Try loop avoidance
rowleya Jan 20, 2022
943fbf7
See if this fixes issues with RTEs
rowleya Jan 21, 2022
3fde338
Add information to allow pre-merging
rowleya Jan 24, 2022
d9b7c16
Fix tests
rowleya Jan 24, 2022
83b8fb9
Fix
rowleya Jan 24, 2022
e3c7e38
Debug attempt
rowleya Jan 24, 2022
8965892
More debug
rowleya Jan 24, 2022
49c877f
Debug even more!
rowleya Jan 25, 2022
90ad622
Fix
rowleya Jan 25, 2022
66e13ed
Oops
rowleya Jan 25, 2022
aa98451
Make sure ranges are accurate
rowleya Jan 25, 2022
ee55e54
Put max_keys where it actually belongs
rowleya Jan 25, 2022
ec9b9bf
Allow going back to basics
rowleya Jan 25, 2022
88e4f68
Add to package
rowleya Jan 25, 2022
00aec95
Only allocate entries that remain
rowleya Jan 26, 2022
2fe0490
undebug
rowleya Jan 26, 2022
02871eb
Add things needed
rowleya Feb 3, 2022
1a49ab1
Make it not bigger than needed
rowleya Feb 3, 2022
b4d75b7
Add max atoms per core property
rowleya Feb 3, 2022
8e31c7f
Fix allocation
rowleya Feb 7, 2022
3ba2d7f
Account for SDRAM from system vertices too
rowleya Feb 9, 2022
70ecb61
Merge branch 'master' into reduce_overhead
rowleya Feb 10, 2022
e8a4378
Make it a list here
rowleya Feb 10, 2022
4c1052f
Allocate from the cores actually available
rowleya Feb 14, 2022
49961c8
See how much has been done
rowleya Feb 15, 2022
422fe84
Fix use
rowleya Feb 15, 2022
4c7805b
Call the right thing
rowleya Feb 15, 2022
0de3812
Try to understand issues
rowleya Feb 15, 2022
a711d41
Sometimes you pass a small chip, especially when cores are disabled
rowleya Feb 15, 2022
fdf6365
Try more careful placement
rowleya Feb 15, 2022
9afbdbd
Keep sane
rowleya Feb 15, 2022
bb7b49b
Debug
rowleya Feb 15, 2022
cc67fd9
Remove earlier
rowleya Feb 15, 2022
d03c85d
Merge branch 'master' into reduce_overhead
rowleya Mar 21, 2022
cab7af6
Fix constraint handling
rowleya Mar 22, 2022
4df5c31
Start changing
rowleya Mar 28, 2022
97dd733
Out with the old
rowleya Apr 6, 2022
87e2597
merge
Christian-B Apr 19, 2022
9cb70d4
remove badly merged import
Christian-B Apr 19, 2022
56fac9f
Complete machine graph removal
rowleya Apr 22, 2022
8f78bd3
Remove tests for things that are gone
rowleya Apr 22, 2022
f7f8faf
Flake8
rowleya Apr 22, 2022
c0cd0dc
Remove more machine graph
rowleya Apr 25, 2022
174226f
Allow placements to continue on last chip
rowleya Apr 26, 2022
fdb5119
Merge branch 'master' into reduce_overhead
rowleya Apr 26, 2022
e36d7dc
Allow allocation of things in addition those in the app graph
rowleya Apr 27, 2022
c80011e
Add a way to get the tags and vertices together
rowleya Apr 27, 2022
2e135b7
Fix tests
rowleya Apr 28, 2022
e6edac0
Fix placer to work with repeat use of chips
rowleya May 4, 2022
ed2d233
Fix placer to better use machine
rowleya May 6, 2022
c6e2931
Remove prints
rowleya May 6, 2022
20c8067
Simplify partitions
rowleya May 9, 2022
0e27ea8
Move back in here as only used here
rowleya May 10, 2022
140c581
Reuse spaces that have been discarded earlier
rowleya May 10, 2022
e3fe970
Allow reset of graph
rowleya May 11, 2022
29104e8
Don't ask machine vertices for fixed keys
rowleya May 13, 2022
96af025
Remove unused functionality
rowleya May 13, 2022
af03156
Fix tests for changes
rowleya May 13, 2022
cf026ad
Better errors
rowleya May 13, 2022
f0ede3c
Be careful in case constraint uses current chip
rowleya May 13, 2022
d759ef7
Also allocate when there are internal partitions
rowleya May 13, 2022
41063ee
merge
Christian-B May 16, 2022
3e4e34a
merge fix
Christian-B May 18, 2022
8c1dc61
Reverse tags get added here...
rowleya May 20, 2022
a592989
Don't clear these machine vertices!
rowleya May 24, 2022
eb5d382
Add and fix external device placement and routing
rowleya May 26, 2022
381e854
Flake8
rowleya May 26, 2022
1e316f6
Virtual chips are so last year
rowleya May 26, 2022
22e97e6
Oops
rowleya May 26, 2022
52e67e6
Ensure that only app or machine vertices are in routes
rowleya Jun 6, 2022
bb9a493
Merge branch 'master' into reduce_overhead
rowleya Jun 7, 2022
abfaac7
Use max atoms from vertex
rowleya Jun 7, 2022
ff7b9a1
Remove tests no longer relevant
rowleya Jun 7, 2022
1f401f9
Remove property
rowleya Jun 7, 2022
1745193
Simplify
rowleya Jun 14, 2022
6cd6532
Make one-to-one things work
rowleya Jun 23, 2022
bb44993
Flake8
rowleya Jun 23, 2022
da2d77a
renamed concentric_chips to concentric_xys
Christian-B Jun 28, 2022
2f75a98
Improve error reporting
rowleya Jun 30, 2022
bb716f3
Merge branch 'reduce_overhead' of https://github.com/SpiNNakerManches…
rowleya Jun 30, 2022
025d533
Fix the report again
rowleya Jun 30, 2022
c5f69ed
Need a bit more
rowleya Jun 30, 2022
d247c3c
More specific
rowleya Jun 30, 2022
75255fa
Return char needed
rowleya Jun 30, 2022
c66e166
Chips are never virtual any more
Christian-B Jun 30, 2022
27f78ef
identify _ChipWithSpace as next_chip_space and last_chip_space
Christian-B Jul 4, 2022
46b1c76
comment out board_colours
Christian-B Jul 4, 2022
22c438f
dont covert Chips to xy tuples
Christian-B Jul 4, 2022
071c2fd
merge
Christian-B Jul 4, 2022
29ba59b
flake8
Christian-B Jul 4, 2022
b024c62
say xy when you mean coordinates and not Chip
Christian-B Jul 4, 2022
3d818ca
use xy when dealing with coordinates
Christian-B Jul 5, 2022
c2b2bb8
flake8
Christian-B Jul 5, 2022
496c767
whitespace
Christian-B Jul 5, 2022
80159e2
Improve doc
rowleya Jul 6, 2022
be913c1
Merge branch 'reduce_overhead' of https://github.com/SpiNNakerManches…
rowleya Jul 6, 2022
417fc1f
Remove new property that no longer gets used
rowleya Jul 6, 2022
b244a0f
Add object
rowleya Jul 6, 2022
e9d6bc3
Fix comment
rowleya Jul 6, 2022
b3f5e3f
Remove init param
rowleya Jul 6, 2022
25b927f
Rename for simplicity
rowleya Jul 6, 2022
a5801b8
Use format adapter
rowleya Jul 6, 2022
760b523
Simplify
rowleya Jul 7, 2022
84c48d5
Fix drawing placements
rowleya Jul 7, 2022
f6c3397
Make argument optional
rowleya Jul 7, 2022
61ec76e
Avoid pylint error since not imported by default
rowleya Jul 7, 2022
7919814
Apparently it *is* used
rowleya Jul 7, 2022
466fd7e
Fix what is returned when nothing is returned
rowleya Jul 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@

from .abstract_key_allocator_constraint import AbstractKeyAllocatorConstraint
from .contiguous_key_range_constraint import ContiguousKeyRangeContraint
from .fixed_key_field_constraint import FixedKeyFieldConstraint
from .fixed_key_and_mask_constraint import FixedKeyAndMaskConstraint
from .fixed_mask_constraint import FixedMaskConstraint
from .share_key_constraint import ShareKeyConstraint

__all__ = ["AbstractKeyAllocatorConstraint",
"ContiguousKeyRangeContraint",
Christian-B marked this conversation as resolved.
Show resolved Hide resolved
"FixedKeyFieldConstraint",
"FixedKeyAndMaskConstraint",
"FixedMaskConstraint",
"ShareKeyConstraint"]
"FixedKeyAndMaskConstraint"]
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,21 @@ class FixedKeyAndMaskConstraint(AbstractKeyAllocatorConstraint):
# The key and mask combinations to fix
"_keys_and_masks",

# Optional function which will be called to translate the
# keys_and_masks list into individual keys If missing, the keys will
# be generated by iterating through the keys_and_masks list directly.
# The function parameters are:
# An iterable of keys and masks
# A machine edge
# Number of keys to generate (may be None)
"_key_list_function"
# The identifier of the partition to which this applies, or None
# if only one partition is expected
"_partition"

]

def __init__(self, keys_and_masks, key_list_function=None):
def __init__(self, keys_and_masks, partition=None):
"""
:param iterable(BaseKeyAndMask) keys_and_masks:
The key and mask combinations to fix
:param key_list_function: Optional function which will be called to\
translate the `keys_and_masks` list into individual keys. If\
missing, the keys will be generated by iterating through the \
`keys_and_masks` list directly. The function parameters are:
* An iterable of keys and masks
* A machine edge
* Number of keys to generate (may be None)
:type key_list_function: callable(iterable(tuple(
BaseKeyAndMask, MachineEdge, int)), iterable(int))
:param partition:
The identifier of the partition to which this constraint applies,
or None if it applies to all partitions (meaning there is only
one partition expected)
:type partition: str or None
"""
for keys_and_mask in keys_and_masks:
if not isinstance(keys_and_mask, BaseKeyAndMask):
Expand All @@ -62,7 +53,7 @@ def __init__(self, keys_and_masks, key_list_function=None):
"a key_and_mask object")

self._keys_and_masks = keys_and_masks
self._key_list_function = key_list_function
self._partition = partition

@property
def keys_and_masks(self):
Expand All @@ -74,26 +65,31 @@ def keys_and_masks(self):
return self._keys_and_masks

@property
def key_list_function(self):
""" A function to call to generate the keys
def partition(self):
""" The identifier of the partition to which this constraint applies,
or None if it applies to the only expected partition

:return: A python function, or None if the default function can be used
:rtype: callable(iterable(tuple(BaseKeyAndMask, MachineEdge, int)),
iterable(int))
:rtype: str or None
"""
return self._key_list_function
return self._partition

def applies_to_partition(self, partition):
""" Determine if this applies to the given partition identifier or not

:param str partition: The identifier of the partition to check
:rtype: bool
"""
return self._partition is None or self._partition == partition

def __repr__(self):
return (
"FixedKeyAndMaskConstraint("
"keys_and_masks={}, key_list_function={})".format(
self._keys_and_masks, self.key_list_function))
"keys_and_masks={}, partition={})".format(
self._keys_and_masks, self._partition))

def __eq__(self, other):
if not isinstance(other, FixedKeyAndMaskConstraint):
return False
if other.key_list_function != self._key_list_function:
return False
if len(self._keys_and_masks) != len(other.keys_and_masks):
return False
return all(km in other.keys_and_masks for km in self._keys_and_masks)
Expand All @@ -102,6 +98,4 @@ def __ne__(self, other):
return not self.__eq__(other)

def __hash__(self):
return (
frozenset(self._keys_and_masks),
self._key_list_function).__hash__()
return frozenset(self._keys_and_masks).__hash__()

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions pacman/model/constraints/partitioner_constraints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from .abstract_partitioner_constraint import AbstractPartitionerConstraint
from .same_atoms_as_vertex_constraint import SameAtomsAsVertexConstraint

__all__ = ["AbstractPartitionerConstraint",
Christian-B marked this conversation as resolved.
Show resolved Hide resolved
"SameAtomsAsVertexConstraint"]
__all__ = ["AbstractPartitionerConstraint"]

This file was deleted.

9 changes: 1 addition & 8 deletions pacman/model/constraints/placer_constraints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from .abstract_placer_constraint import AbstractPlacerConstraint
from .board_constraint import BoardConstraint
from .chip_and_core_constraint import ChipAndCoreConstraint
from .radial_placement_from_chip_constraint import (
RadialPlacementFromChipConstraint)
from .same_chip_as_constraint import SameChipAsConstraint

__all__ = ["AbstractPlacerConstraint", "BoardConstraint",
"ChipAndCoreConstraint",
"RadialPlacementFromChipConstraint",
"SameChipAsConstraint"]
__all__ = ["AbstractPlacerConstraint", "ChipAndCoreConstraint"]
Loading