-
Notifications
You must be signed in to change notification settings - Fork 57
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
Custom update merge fix #557
Conversation
Codecov ReportBase: 88.80% // Head: 88.81% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #557 +/- ##
=======================================
Coverage 88.80% 88.81%
=======================================
Files 76 76
Lines 12344 12354 +10
=======================================
+ Hits 10962 10972 +10
Misses 1382 1382
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
# Conflicts: # src/genn/genn/models.cc
…chedness of the variable references (overriding ``VarAccessDuplication``)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, it does get complicated with merging/ hashing/ custom updates ... but it looks like a sensible solution.
Yeah - I feel maybe there might be some extra constraints that could be added which would simplify the whole system somewhat e.g. I'm pretty sure I haven't yet had a use-case for a custom update that simultaneously references variables in different populations of the size (although this is supported) |
In the course of my structural plasticity implementing, I found not one but two bugs in the variable reference/custom update stuff!
Merging
In general, when merging together custom updates, what the variable references target doesn't really matter - they're just pointers. However, whether variable references point to variables with
VarAccessDuplication::DUPLICATE
,VarAccessDuplication::SHARED
etc changes the required index calculating code so this needs to be considered. This PR includes the variable duplication mode in the hashes used for merging groups and extends the unit tests to better cover corner cases in this area.References to custom update variables
Unlike synapses and neurons which are always batched if the model is, if custom updates are batched or not depends on whether they are attached to
VarAccessDuplication::DUPLICATE
variables (and whether the model is batched). This means if you make references to these variables from other custom updates whether these 'downstream' custom updates should be batched should depend on whether the upstream custom update was batched as well as the mode of the variables. This PR adds aisBatched
method to each variable reference and extends the unit tests to cover this.