-
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
Toeplitz KernelG #484
Toeplitz KernelG #484
Conversation
…etSynapseMatrixConnectivity`` and ``getSynapseMatrixWeight``)
Codecov Report
@@ Coverage Diff @@
## master #484 +/- ##
==========================================
- Coverage 87.49% 86.94% -0.56%
==========================================
Files 82 84 +2
Lines 17695 17972 +277
==========================================
+ Hits 15483 15625 +142
- Misses 2212 2347 +135
Continue to review full report at Codecov.
|
…ixed in state variable initialisation e.g. row build state variables
… max row lengt for convolutions
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.
After thinking things through & helpful discussion I believe I understand the scheme and the central calculations for the "on-demand" synaptic connections are right; including a cursory inspection of corner cases for different padding which seem consistent with TF conventions. I think this can be merged.
Building on #478, this adds the
TOEPLITZ_KERNELG
matrix type which implements convolution-adjacent types of connectivity using a doubly-blocked Toeplitz approach. Essentially this PR involves:CodeGenerator::InitToeplitzConnectivitySnippet::Base
snippet type containing the required code strings, state variables etc andCodeGenerator::InitToeplitzConnectivitySnippet::Init
wrapper type for bundling snippets with required parameters. I don't really see users creating too many of these but it's a much nicer way of implementing the connectivity than adding loads of special stuff toSynapseGroup
.ModelSpec::addSynapsePopulation
which take aCodeGenerator::InitToeplitzConnectivitySnippet::Init
object as the last parameterConnectivityInitialiser
toSparseConnectivityInitialiser
to make clear separation with newToeplitzConnectivityInitialiser
.CodeGenerator::PresynapticUpdateStrategySIMT::PostSpanToeplitz
with first-pass implementation (no separating of input channels)At optimal batch-size, performance is approximately 3x faster than
PROCEDURAL_KERNELG
on VGG16 models (both CIFAR10 scale and ImageNet). However, at ImageNet scale, this equates to 7 hours rather than 24 hours to performance inference over the whole validation set so still pretty slow. Because there are onlykernel width * kernel height * kernel out channels
threads launched for each synapse group, this currently (splitting spikes and getting a factor ofkernel input channels
more threads is likely to solve this) performs less well thanPROCEDURAL_KERNELG
with batch size 1.TODO