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``)
tnowotny
left a comment
There was a problem hiding this comment.
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::SHAREDetc 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::DUPLICATEvariables (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 aisBatchedmethod to each variable reference and extends the unit tests to cover this.