From f2ab5884feb51705503464f475f36c923386a315 Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Fri, 29 May 2020 13:48:08 +0100 Subject: [PATCH 1/5] neither of Alan Diamond's features exist anymore --- doxygen/14_Credits.dox | 2 -- 1 file changed, 2 deletions(-) diff --git a/doxygen/14_Credits.dox b/doxygen/14_Credits.dox index efb946782b..387ac4842f 100644 --- a/doxygen/14_Credits.dox +++ b/doxygen/14_Credits.dox @@ -12,8 +12,6 @@ Izhikevich model and sparse connectivity by Esin Yavuz. Block size optimisations, delayed synapses and page-locked memory by James Turner. -Automatic brackets and dense-to-sparse network conversion helper tools by Alan Diamond. - User-defined synaptic and postsynaptic methods by Alex Cope and Esin Yavuz. Example projects were provided by Alan Diamond, James Turner, Esin Yavuz and Thomas Nowotny. From ecb77285b9cbff909797ce78fec2e9a8a504e8fc Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Fri, 29 May 2020 14:40:00 +0100 Subject: [PATCH 2/5] added doxygen for ModelSpec::addSlaveSynapsePopulation --- include/genn/genn/modelSpec.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/include/genn/genn/modelSpec.h b/include/genn/genn/modelSpec.h index 2b2f8b0424..36902ae362 100644 --- a/include/genn/genn/modelSpec.h +++ b/include/genn/genn/modelSpec.h @@ -240,7 +240,7 @@ class GENN_EXPORT ModelSpec //! Adds a synapse population to the model using weight update and postsynaptic models managed by the user /*! \tparam WeightUpdateModel type of weight update model (derived from WeightUpdateModels::Base). \tparam PostsynapticModel type of postsynaptic model (derived from PostsynapticModels::Base). - \param name string containing unique name of neuron population. + \param name string containing unique name of synapse population. \param mtype how the synaptic matrix associated with this synapse population should be represented. \param delaySteps integer specifying number of timesteps delay this synaptic connection should incur (or NO_DELAY for none) @@ -290,7 +290,7 @@ class GENN_EXPORT ModelSpec //! Adds a synapse population to the model using singleton weight update and postsynaptic models created using standard DECLARE_MODEL and IMPLEMENT_MODEL macros /*! \tparam WeightUpdateModel type of weight update model (derived from WeightUpdateModels::Base). \tparam PostsynapticModel type of postsynaptic model (derived from PostsynapticModels::Base). - \param name string containing unique name of neuron population. + \param name string containing unique name of synapse population. \param mtype how the synaptic matrix associated with this synapse population should be represented. \param delaySteps integer specifying number of timesteps delay this synaptic connection should incur (or NO_DELAY for none) \param src string specifying name of presynaptic (source) population @@ -322,7 +322,7 @@ class GENN_EXPORT ModelSpec //! Adds a synapse population to the model using singleton weight update and postsynaptic models created using standard DECLARE_MODEL and IMPLEMENT_MODEL macros /*! \tparam WeightUpdateModel type of weight update model (derived from WeightUpdateModels::Base). \tparam PostsynapticModel type of postsynaptic model (derived from PostsynapticModels::Base). - \param name string containing unique name of neuron population. + \param name string containing unique name of synapse population. \param mtype how the synaptic matrix associated with this synapse population should be represented. \param delaySteps integer specifying number of timesteps delay this synaptic connection should incur (or NO_DELAY for none) \param src string specifying name of presynaptic (source) population @@ -350,7 +350,18 @@ class GENN_EXPORT ModelSpec } - + + //! Adds a synapse population to the model using shared per-synapse variables and a postsynaptic model managed by the user + /*! \tparam PostsynapticModel type of postsynaptic model (derived from PostsynapticModels::Base). + \param name string containing unique name of synapse population. + \param weightSharingMasterName string containing name of 'master' synapse population + \param delaySteps integer specifying number of timesteps delay this synaptic connection should incur (or NO_DELAY for none) + \param src string specifying name of presynaptic (source) population + \param trg string specifying name of postsynaptic (target) population + \param psm postsynaptic model to use for synapse group. + \param postsynapticParamValues parameters for postsynaptic model wrapped in PostsynapticModel::ParamValues object. + \param postsynapticVarInitialisers postsynaptic model state variable initialiser snippets and parameters wrapped in NeuronModel::VarValues object. + \return pointer to newly created SynapseGroup */ template SynapseGroup *addSlaveSynapsePopulation(const std::string &name, const std::string &weightSharingMasterName, unsigned int delaySteps, const std::string &src, const std::string &trg, const PostsynapticModel *psm, const typename PostsynapticModel::ParamValues &postsynapticParamValues, const typename PostsynapticModel::VarValues &postsynapticVarInitialisers) @@ -406,6 +417,16 @@ class GENN_EXPORT ModelSpec } } + //! Adds a synapse population to the model using shared per-synapse variables and a singleton postsynaptic model created using standard DECLARE_MODEL and IMPLEMENT_MODEL macros + /*! \tparam PostsynapticModel type of postsynaptic model (derived from PostsynapticModels::Base). + \param name string containing unique name of synapse population. + \param weightSharingMasterName string containing name of 'master' synapse population + \param delaySteps integer specifying number of timesteps delay this synaptic connection should incur (or NO_DELAY for none) + \param src string specifying name of presynaptic (source) population + \param trg string specifying name of postsynaptic (target) population + \param postsynapticParamValues parameters for postsynaptic model wrapped in PostsynapticModel::ParamValues object. + \param postsynapticVarInitialisers postsynaptic model state variable initialiser snippets and parameters wrapped in NeuronModel::VarValues object. + \return pointer to newly created SynapseGroup */ template SynapseGroup *addSlaveSynapsePopulation(const std::string &name, const std::string &weightSharingMasterName, unsigned int delaySteps, const std::string &src, const std::string &trg, const typename PostsynapticModel::ParamValues &postsynapticParamValues, const typename PostsynapticModel::VarValues &postsynapticVarInitialisers) @@ -421,7 +442,7 @@ class GENN_EXPORT ModelSpec //! Adds a new current source to the model using a current source model managed by the user /*! \tparam CurrentSourceModel type of current source model (derived from CurrentSourceModels::Base). - \param currentSourceName string containing unique name of current source. + \param name string containing unique name of current source. \param model current source model to use for current source. \param targetNeuronGroupName string name of the target neuron group \param paramValues parameters for model wrapped in CurrentSourceModel::ParamValues object. @@ -453,7 +474,7 @@ class GENN_EXPORT ModelSpec //! Adds a new current source to the model using a singleton current source model created using standard DECLARE_MODEL and IMPLEMENT_MODEL macros /*! \tparam CurrentSourceModel type of neuron model (derived from CurrentSourceModel::Base). - \param currentSourceName string containing unique name of current source. + \param name string containing unique name of current source. \param targetNeuronGroupName string name of the target neuron group \param paramValues parameters for model wrapped in CurrentSourceModel::ParamValues object. \param varInitialisers state variable initialiser snippets and parameters wrapped in CurrentSourceModel::VarValues object. From c8888b58fb4bdc5becc1e477dc19195c878d4a15 Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Fri, 29 May 2020 14:44:11 +0100 Subject: [PATCH 3/5] added recent papers --- doxygen/papers.bib | 137 +++++++++++++++++++++++++++++---------------- 1 file changed, 90 insertions(+), 47 deletions(-) diff --git a/doxygen/papers.bib b/doxygen/papers.bib index 6808b1894c..47ce7573c1 100644 --- a/doxygen/papers.bib +++ b/doxygen/papers.bib @@ -1,19 +1,19 @@ @book{Traub1991, - title = {Neural Networks of the Hippocampus}, - publisher = {Cambridge University Press}, - year = {1991}, - author = {R. D. Traub and R. Miles}, - address = {New York} + title = {Neural Networks of the Hippocampus}, + publisher = {Cambridge University Press}, + year = {1991}, + author = {R. D. Traub and R. Miles}, + address = {New York} } @article{izhikevich2003simple, - title={Simple model of spiking neurons}, - author={Izhikevich, Eugene M}, - journal={IEEE Transactions on neural networks}, - volume={14}, - number={6}, - pages={1569--1572}, - year={2003} + title={Simple model of spiking neurons}, + author={Izhikevich, Eugene M}, + journal={IEEE Transactions on neural networks}, + volume={14}, + number={6}, + pages={1569--1572}, + year={2003} } @article{Morrison2008, @@ -31,49 +31,92 @@ @article{Morrison2008 } @article{nowotny2005self, - title={Self-organization in the olfactory system: one shot odor recognition in insects}, - author={Nowotny, Thomas and Huerta, Ram{\'o}n and Abarbanel, Henry DI and Rabinovich, Mikhail I}, - journal={Biological cybernetics}, - volume={93}, - number={6}, - pages={436--446}, - year={2005}, - publisher={Springer}, - doi={10.1007/s00422-005-0019-7} + title={Self-organization in the olfactory system: one shot odor recognition in insects}, + author={Nowotny, Thomas and Huerta, Ram{\'o}n and Abarbanel, Henry DI and Rabinovich, Mikhail I}, + journal={Biological cybernetics}, + volume={93}, + number={6}, + pages={436--446}, + year={2005}, + publisher={Springer}, + doi={10.1007/s00422-005-0019-7} } @article{Rulkov2002, - title={Modeling of spiking-bursting neural behavior using two-dimensional map}, - author={Rulkov, Nikolai F}, - journal={Physical Review E}, - volume={65}, - number={4}, - pages={041922}, - year={2002}, - publisher={APS} + title={Modeling of spiking-bursting neural behavior using two-dimensional map}, + author={Rulkov, Nikolai F}, + journal={Physical Review E}, + volume={65}, + number={4}, + pages={041922}, + year={2002}, + publisher={APS} } @INPROCEEDINGS{Nowotny2010, - author = {T.~Nowotny}, - title = {Parallel implementation of a spiking neuronal network model of unsupervised - olfactory learning on {NVidia CUDA}}, - booktitle = {IEEE World Congress on Computational Intelligence}, - year = {2010}, - editor = {P. Sobrevilla}, - pages = {3238-3245}, - address = {Barcelona}, - organization = {IEEE} + author = {T.~Nowotny}, + title = {Parallel implementation of a spiking neuronal network model of unsupervised + olfactory learning on {NVidia CUDA}}, + booktitle = {IEEE World Congress on Computational Intelligence}, + year = {2010}, + editor = {P. Sobrevilla}, + pages = {3238-3245}, + address = {Barcelona}, + organization = {IEEE} } @article {brian2genn2018, - author = {Stimberg, Marcel and Goodman, Dan F. M. and Nowotny, Thomas}, - title = {Brian2GeNN: a system for accelerating a large variety of spiking neural networks with graphics hardware}, - year = {2018}, - doi = {10.1101/448050}, - publisher = {Cold Spring Harbor Laboratory}, - abstract = {"Brian" is a popular Python-based simulator for spiking neural networks, commonly used in computational neuroscience. GeNN is a C++-based meta-compiler for accelerating spiking neural network simulations using consumer or high performance grade graphics processing units (GPUs). Here we introduce a new software package, Brian2GeNN, that connects the two systems so that users can make use of GeNN GPU acceleration when developing their models in Brian, without requiring any technical knowledge about GPUs, C++ or GeNN. The new Brian2GeNN software uses a pipeline of code generation to translate Brian scripts into C++ code that can be used as input to GeNN, and subsequently can be run on suitable NVIDIA GPU accelerators. From the user{\textquoteright}s perspective, the entire pipeline is invoked by adding two simple lines to their Brian scripts. We have shown that using Brian2GeNN, typical models can run tens to hundreds of times faster than on CPU.}, - URL = {https://www.biorxiv.org/content/early/2018/10/20/448050}, - eprint = {https://www.biorxiv.org/content/early/2018/10/20/448050.full.pdf}, - journal = {bioRxiv} + author = {Stimberg, Marcel and Goodman, Dan F. M. and Nowotny, Thomas}, + title = {Brian2GeNN: a system for accelerating a large variety of spiking neural networks with graphics hardware}, + year = {2018}, + doi = {10.1101/448050}, + publisher = {Cold Spring Harbor Laboratory}, + abstract = {"Brian" is a popular Python-based simulator for spiking neural networks, commonly used in computational neuroscience. GeNN is a C++-based meta-compiler for accelerating spiking neural network simulations using consumer or high performance grade graphics processing units (GPUs). Here we introduce a new software package, Brian2GeNN, that connects the two systems so that users can make use of GeNN GPU acceleration when developing their models in Brian, without requiring any technical knowledge about GPUs, C++ or GeNN. The new Brian2GeNN software uses a pipeline of code generation to translate Brian scripts into C++ code that can be used as input to GeNN, and subsequently can be run on suitable NVIDIA GPU accelerators. From the user{\textquoteright}s perspective, the entire pipeline is invoked by adding two simple lines to their Brian scripts. We have shown that using Brian2GeNN, typical models can run tens to hundreds of times faster than on CPU.}, + URL = {https://www.biorxiv.org/content/early/2018/10/20/448050}, + eprint = {https://www.biorxiv.org/content/early/2018/10/20/448050.full.pdf}, + journal = {bioRxiv} } + +@article{Knight2020, + abstract = {Large-scale simulations of spiking neural network models are an important tool for improving our understanding of the dynamics and ultimately the function of brains. However, even small mammals such as mice have on the order of 1{\{}$\backslash$texttimes{\}}10{\^{}}12 synaptic connections which, in simulations, are each typically charaterized by at least one floating-point value. This amounts to several terabytes of data - an unrealistic memory requirement for a single desktop machine. Large models are therefore typically simulated on distributed supercomputers which is costly and limits large-scale modelling to a few privileged research groups. In this work, we describe extensions to GeNN - our Graphical Processing Unit{\~{}}(GPU) accelerated spiking neural network simulator - that enable it to {\{}$\backslash$textquoteright{\}}procedurally{\{}$\backslash$textquoteright{\}} generate connectivity and synaptic weights {\{}$\backslash$textquoteright{\}}on the go{\{}$\backslash$textquoteright{\}} as spikes are triggered, instead of storing and retrieving them from memory. We find that GPUs are well-suited to this approach because of their raw computational power which, due to memory bandwidth limitations, is often under-utilised when simulating spiking neural networks. We demonstrate the value of our approach with a recent model of the Macaque visual cortex consisting of 4.13{\{}$\backslash$texttimes{\}}10{\^{}}6 neurons and 24.2{\{}$\backslash$texttimes{\}}10{\^{}}9 synapses. Using our new method, it can be simulated on a single GPU - a significant step forward in making large-scale brain modelling accessible to many more researchers. Our results match those obtained on a supercomputer and the simulation runs up to 35{\%} faster on a single high-end GPU than previously on over 1000 supercomputer nodes.Competing Interest StatementThe authors have declared no competing interest.}, + author = {Knight, James C and Nowotny, Thomas}, + doi = {10.1101/2020.04.27.063693}, + journal = {bioRxiv}, + publisher = {Cold Spring Harbor Laboratory}, + title = {{Larger GPU-accelerated brain simulations with procedural connectivity}}, + url = {https://www.biorxiv.org/content/10.1101/2020.04.27.063693v2}, + year = {2020} +} + +@article{Knight2018, + author = {Knight, James C. and Nowotny, Thomas}, + doi = {10.3389/fnins.2018.00941}, + issn = {1662-453X}, + journal = {Frontiers in Neuroscience}, + keywords = {GPU, high-performance computing, parallel computin,accuracy of simulation,benchmarking,computational neuroscience,energy to solution,gpu,high-performance computing,parallel computing,spiking neural networks}, + number = {December}, + pages = {1--19}, + title = {{GPUs Outperform Current HPC and Neuromorphic Solutions in Terms of Speed and Energy When Simulating a Highly-Connected Cortical Model}}, + url = {https://www.frontiersin.org/article/10.3389/fnins.2018.00941/full}, + volume = {12}, + year = {2018} +} + +@article{Potjans2012, + author = {Potjans, Tobias C. and Diesmann, Markus}, + doi = {10.1093/cercor/bhs358}, + issn = {1460-2199}, + journal = {Cerebral Cortex}, + keywords = {connections,connectivity maps,cortical microcircuit,large-scale models,layered network,speci fi city of}, + mendeley-groups = {Manchester PhD/Microcircuit}, + month = {mar}, + number = {3}, + pages = {785--806}, + pmid = {23203991}, + title = {{The Cell-Type Specific Cortical Microcircuit: Relating Structure and Activity in a Full-Scale Spiking Network Model}}, + url = {http://www.ncbi.nlm.nih.gov/pubmed/23203991 https://academic.oup.com/cercor/article-lookup/doi/10.1093/cercor/bhs358}, + volume = {24}, + year = {2014} +} + From 8f06ca928291d9629d4f934c308b486065301bbe Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Fri, 29 May 2020 14:50:12 +0100 Subject: [PATCH 4/5] release notes --- doxygen/09_ReleaseNotes.dox | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doxygen/09_ReleaseNotes.dox b/doxygen/09_ReleaseNotes.dox index 5d76bdca3d..9e8e52e2c0 100644 --- a/doxygen/09_ReleaseNotes.dox +++ b/doxygen/09_ReleaseNotes.dox @@ -1,4 +1,26 @@ /*! \page ReleaseNotes Release Notes +Release Notes for GeNN v4.3.0 (PyGeNN 0.4.0) +==== +This release adds a number of significant new features to GeNN as well as making small improvements to PyGeNN. +It also includes a number of bug fixes that have been identified since the 4.2.1 release. + +User Side Changes +---- +1. Previously GeNN performed poorly with large numbers of populations. This version includes a new code generator which effectively solves this problem (see \cite Knight2020). +2. ``InitSparseConnectivitySnippet::Base`` row build state and ``NeuronModels::Base`` additional input variables could only previously be initialised with a numeric value. Now they can be initialised with a code string supporting substitutions etc. +3. Added GeNN implementation of cortical microcircuit model \cite Potjans2012 to userprojects (discussed further in \cite Knight2018). Also demonstrates how to dynamically loads GeNN models rather than linking against them. +4. Previously you pushed state to and from device in PyGeNN using methods like ``pygenn.genn_model.GeNNModel.push_current_spikes_to_device`` which was somewhat cumbersome. These have now been wrapped in methods like ``pygenn.genn_groups.NeuronGroup.push_current_spikes_to_device`` which is somewhat nicer. +5. ``CodeGenerator::generateAll`` function now returns memory estimates which is, in turn, returned from ``pygenn.genn_model.GeNNModel.build``. +6. To better support batching of inputs into multiple instances of the same model, added ``ModelSpec::addSlaveSynapsePopulation`` to add synapse populations which share per-synapse state with a 'master' synapse group. +7. Added extra global parameters to variable initialisation snippets - can be used for lookup table style functionality. +8. Added support for host initialisation of sparse connectivity initialisation snippet extra global parameters. This allows host-based initialisation to be encapsulated within a ``InitSparseConnectivitySnippet::Base`` class. + +Bug fixes: +---- +1. Fixed issues preventing spike recorder classes from compiling with GCC 4.9, thanks to Christoph Ostrau for this one! +2. The initialisers for pre and postsynaptic weight update model variables were not searched for references to an RNG when determining whether a neuron group requires an initialisation RNG. +3. Fixed issue with PyGeNN and custom var init snippets that led to segfaults. + Release Notes for GeNN v4.2.1 (PyGeNN 0.3.1) ==== This release fixes several small issues including several relating to Brian2GeNN compatibility. From c96f6cbf63cdb442ce54dc48873ce778e94c9097 Mon Sep 17 00:00:00 2001 From: Thomas Nowotny Date: Fri, 29 May 2020 17:17:35 +0100 Subject: [PATCH 5/5] Fixed some typos --- doxygen/09_ReleaseNotes.dox | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doxygen/09_ReleaseNotes.dox b/doxygen/09_ReleaseNotes.dox index 9e8e52e2c0..a58991c7ca 100644 --- a/doxygen/09_ReleaseNotes.dox +++ b/doxygen/09_ReleaseNotes.dox @@ -7,13 +7,13 @@ It also includes a number of bug fixes that have been identified since the 4.2.1 User Side Changes ---- 1. Previously GeNN performed poorly with large numbers of populations. This version includes a new code generator which effectively solves this problem (see \cite Knight2020). -2. ``InitSparseConnectivitySnippet::Base`` row build state and ``NeuronModels::Base`` additional input variables could only previously be initialised with a numeric value. Now they can be initialised with a code string supporting substitutions etc. -3. Added GeNN implementation of cortical microcircuit model \cite Potjans2012 to userprojects (discussed further in \cite Knight2018). Also demonstrates how to dynamically loads GeNN models rather than linking against them. -4. Previously you pushed state to and from device in PyGeNN using methods like ``pygenn.genn_model.GeNNModel.push_current_spikes_to_device`` which was somewhat cumbersome. These have now been wrapped in methods like ``pygenn.genn_groups.NeuronGroup.push_current_spikes_to_device`` which is somewhat nicer. -5. ``CodeGenerator::generateAll`` function now returns memory estimates which is, in turn, returned from ``pygenn.genn_model.GeNNModel.build``. +2. ``InitSparseConnectivitySnippet::Base`` row build state and ``NeuronModels::Base`` additional input variables could previously only be initialised with a numeric value. Now they can be initialised with a code string supporting substitutions etc. +3. Added GeNN implementation of cortical microcircuit model \cite Potjans2012 to userprojects (discussed further in \cite Knight2018). Also demonstrates how to dynamically load GeNN models rather than linking against them. +4. Previously one pushed states and spikes to and from device in PyGeNN using methods like ``pygenn.genn_model.GeNNModel.push_current_spikes_to_device`` which was somewhat cumbersome. These have now been wrapped in methods like ``pygenn.genn_groups.NeuronGroup.push_current_spikes_to_device`` which is somewhat nicer. +5. The ``CodeGenerator::generateAll`` function now returns memory estimates which are, in turn, returned from ``pygenn.genn_model.GeNNModel.build``. 6. To better support batching of inputs into multiple instances of the same model, added ``ModelSpec::addSlaveSynapsePopulation`` to add synapse populations which share per-synapse state with a 'master' synapse group. 7. Added extra global parameters to variable initialisation snippets - can be used for lookup table style functionality. -8. Added support for host initialisation of sparse connectivity initialisation snippet extra global parameters. This allows host-based initialisation to be encapsulated within a ``InitSparseConnectivitySnippet::Base`` class. +8. Added support for host initialisation of sparse connectivity initialisation snippet extra global parameters. This allows host-based initialisation to be encapsulated within an ``InitSparseConnectivitySnippet::Base`` class. Bug fixes: ----