Skip to content

Commit

Permalink
Merge pull request #474 from genn-team/4_6_release
Browse files Browse the repository at this point in the history
4.6.0 release
  • Loading branch information
neworderofjamie authored Nov 2, 2021
2 parents f184b37 + f7d818b commit 9d43b7c
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 64 deletions.
6 changes: 3 additions & 3 deletions doxygen/02_Quickstart.dox
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ There are several steps to be completed to define a neuronal network model.
\ref sect_new_var_init section for more information on
initialising these variables to hetererogenous values.

c) A pygenn.genn_model.GeNNModel object needs to be created and the floating point precision to use should be set (see \ref floatPrecision for more information on floating point precision), i.e.
c) A pygenn.GeNNModel object needs to be created and the floating point precision to use should be set (see \ref floatPrecision for more information on floating point precision), i.e.
\code
model = GeNNModel("float", "example")
\endcode
Expand All @@ -266,7 +266,7 @@ There are several steps to be completed to define a neuronal network model.
model.load()
\endcode
\note
If the model isn't changed, pygenn.genn_model.GeNNModel.build doesn't need to be called.
If the model isn't changed, pygenn.GeNNModel.build doesn't need to be called.

4. Also, within the same script, the programmer defines their own "simulation" code. In this code,

Expand All @@ -279,7 +279,7 @@ There are several steps to be completed to define a neuronal network model.
\note
The initial values or initialisation "snippets" specified when defining the model are automatically applied.

c) They use pygenn.genn_model.GeNNModel.step_time() to run one time step on either the CPU or GPU depending on the available hardware.
c) They use pygenn.GeNNModel.step_time() to run one time step on either the CPU or GPU depending on the available hardware.

d) They use functions like pygenn.genn_groups.Group.pull_state_from_device etc to transfer the
results from GPU calculations to the main memory of the host computer
Expand Down
4 changes: 2 additions & 2 deletions doxygen/07_PyGeNN.dox
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/*! \page PyGeNN Python interface (PyGeNN)

As well as being able to build GeNN models and user code directly from C++, you can also access all GeNN features from Python.
The ``pygenn.genn_model.GeNNModel`` class provides a thin wrapper around ``ModelSpec`` as well as providing support for loading and running simulations; and accessing their state.
``SynapseGroup``, ``NeuronGroup`` and ``CurrentSource`` are similarly wrapped by the ``pygenn.genn_groups.SynapseGroup``, ``pygenn.genn_groups.NeuronGroup`` and ``pygenn.genn_groups.CurrentSource`` classes respectively.
The ``pygenn.GeNNModel`` class provides a thin wrapper around ``ModelSpec`` as well as providing support for loading and running simulations; and accessing their state.
``SynapseGroup``, ``NeuronGroup`` and ``CurrentSource`` are similarly wrapped by the ``pygenn.SynapseGroup``, ``pygenn.NeuronGroup`` and ``pygenn.CurrentSource`` classes respectively.

Full installation instructions can be found in \ref pygenn. The following example shows how PyGeNN can be easily interfaced with standard Python packages such as numpy and matplotlib to plot 4 different Izhikevich neuron regimes:

Expand Down
48 changes: 37 additions & 11 deletions doxygen/09_ReleaseNotes.dox
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
/*! \page ReleaseNotes Release Notes

Release Notes for GeNN v4.6.0
====
This release adds a number of significant new features to GeNN as well as several usability improvements for PyGeNN.
It also includes a number of bug fixes that have been identified since the 4.5.1 release.

User Side Changes
----
1. As well as performing arbitrary updates and calculating transposes of weight update model variables, custom updates can now be used to implement 'reductions' so, for example, duplicated variables can be summed across model batches (see \ref custom_update_reduction).
2. Previously, to connect a synapse group to a postsynaptic neuron's additional input variable, a custom postsynaptic model had to be used. SynapseGroup::setPSTargetVar and pygenn.SynapseGroup.ps_target_var can now be used to set the target variable of any synapse group.
3. Previously, weight update model pre and postsynaptic updates and variables got duplicated in the neuron kernel. This was very innefficient and these can now be 'fused' together by setting ModelSpec::setFusePrePostWeightUpdateModels.
4. PyGeNN now shares a version with GeNN itself and this will be accessible via ``pygenn.__version__``.
5. The names of populations and variables are now validated to prevent code with invalid variable names being generated.
6. As well as being able to read the current spikes via the pygenn.NeuronGroup.current_spikes property, they can now also be set.
7. Spike-like events were previously not exposed to PyGeNN. These can now be pushed and pulled via pygenn.NeuronGroup.pull_spike_events_from_device, pygenn.NeuronGroup.push_spike_events_to_device, pygenn.NeuronGroup.pull_current_spike_events_from_device and pygenn.NeuronGroup.push_current_spike_events_to_device; and accessed via pygenn.NeuronGroup.current_spike_events.
8. Added additional error handling to prevent properties of pygenn.GeNNModel that can only be set before the model was built being set afterwards.
9. Variable references can now reference custom update variables (see \ref sectVariableReferences).
10. Updated the default parameters used in the MBody1 example to be more sensible.

Bug fixes:
----
1. Fixed an issue that was preventing genn-buildmodel.sh correctly handling paths with spaces
2. Fix multiple issues with sparse synapse index narrowing
3. Fixed issue where, if GeNN is run in a locale where , is used for decimal point, some generated code was incorrectly formated.
4. Fixed several small issues preventing GeNN from building on GCC 5 Visual C++ 2017

Release Notes for GeNN v4.5.1 (PyGeNN 0.4.6)
====
This release fixes several small issues found in the 4.5.0 release.
Expand All @@ -16,16 +42,16 @@ It also includes a number of bug fixes that have been identified since the 4.4.0

User Side Changes
----
1. When performing inference on datasets, batching helps fill the GPU and improve performance. This could be previously achieved using "master" and "slave" synapse populations but this didn't scale well. Models can now be automatically batched using ``ModelSpec::setBatchSize`` or ``pygenn.genn_model.GeNNModel.batch_size``.
1. When performing inference on datasets, batching helps fill the GPU and improve performance. This could be previously achieved using "master" and "slave" synapse populations but this didn't scale well. Models can now be automatically batched using ``ModelSpec::setBatchSize`` or ``pygenn.GeNNModel.batch_size``.
2. As well as more typical neuron, weight update, postsynaptic and current source models, you can now define custom update models which define a process which can be applied to any variable in the model. These can be used for e.g. resetting state variables or implementing optimisers for gradient-based learning (see \ref defining_custom_updates).
3. Model compilation and CUDA block size optimisation could be rather slow in previous versions. More work is still required in this area but, code will now only be re-generated if the model has actually changed and block sizes will only be re-optimised for modules which have changed. Rebuilding can be forced with the ``-f`` flag to ``genn-buildmodel`` or the ``force_rebuild`` flag to ``pygenn.GeNNModel.build``.
4. Binary PyGeNN wheels are now always built with Python 3.
5. To aid debugging, debug versions of PyGeNN can now be built (see \ref Debugging).
6. OpenCL performance on AMD devices is improved - this has only been tested on a Radeon RX 5700 XT so any feedback from users with other devices would be much appreciated.
7. Exceptions raised by GeNN are now correctly passed through PyGeNN to Python.
8. Spike times (and spike-like event times) can now be accessed, pushed and pulled from PyGeNN (see ``pygenn.genn_groups.NeuronGroup.spike_times``, ``pygenn.genn_groups.NeuronGroup.push_spike_times_to_device`` and ``pygenn.genn_groups.NeuronGroup.pull_spike_times_from_device`` )
9. On models where postsynaptic merging isn't enabled, the postsynaptic input current from a synapse group can now be accessed from PyGeNN via ``pygenn.genn_groups.SynapseGroup.in_syn``; and pushed and pulled with ``pygenn.genn_groups.SynapseGroup.push_in_syn_to_device`` and ``pygenn.genn_groups.SynapseGroup.pull_in_syn_from_device`` respectively.
10. Accessing extra global parameters from PyGeNN was previously rather cumbersome. Now, you don't need to manually pass a size to e.g. ``pygenn.genn_groups.NeuronGroup.pull_extra_global_param_from_device`` and, if you are using non-pointer extra global parameters, you no longer need to call e.g. ``pygenn.genn_groups.NeuronGroup.set_extra_global_param`` before loading your model.
8. Spike times (and spike-like event times) can now be accessed, pushed and pulled from PyGeNN (see ``pygenn.NeuronGroup.spike_times``, ``pygenn.NeuronGroup.push_spike_times_to_device`` and ``pygenn.NeuronGroup.pull_spike_times_from_device`` )
9. On models where postsynaptic merging isn't enabled, the postsynaptic input current from a synapse group can now be accessed from PyGeNN via ``pygenn.SynapseGroup.in_syn``; and pushed and pulled with ``pygenn.SynapseGroup.push_in_syn_to_device`` and ``pygenn.SynapseGroup.pull_in_syn_from_device`` respectively.
10. Accessing extra global parameters from PyGeNN was previously rather cumbersome. Now, you don't need to manually pass a size to e.g. ``pygenn.NeuronGroup.pull_extra_global_param_from_device`` and, if you are using non-pointer extra global parameters, you no longer need to call e.g. ``pygenn.NeuronGroup.set_extra_global_param`` before loading your model.

Bug fixes:
----
Expand Down Expand Up @@ -67,7 +93,7 @@ This release fixes several small issues found in the 4.3.2 release.
Bug fixes:
----
1. Fixed bug in bitmask connectivity and procedural connectivity kernels.
2. Fixed issues with setting model precision in PyGeNN. Time precision can now be set seperately using the ``time_precision`` option to the ``pygenn.genn_model.GeNNModel`` constructor.
2. Fixed issues with setting model precision in PyGeNN. Time precision can now be set seperately using the ``time_precision`` option to the ``pygenn.GeNNModel`` constructor.

Release Notes for GeNN v4.3.2 (PyGeNN 0.4.2)
====
Expand Down Expand Up @@ -104,8 +130,8 @@ 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 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``.
4. Previously one pushed states and spikes to and from device in PyGeNN using methods like ``pygenn.GeNNModel.push_current_spikes_to_device`` which was somewhat cumbersome. These have now been wrapped in methods like ``pygenn.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.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 an ``InitSparseConnectivitySnippet::Base`` class.
Expand Down Expand Up @@ -136,9 +162,9 @@ This release adds a number of new features to GeNN and its Python interface as w

User Side Changes
----
1. Kernel timings can now be enabled from python with ``pygenn.genn_model.GeNNModel.timing_enabled`` and subsequently accessed with ``pygenn.genn_model.GeNNModel.neuron_update_time``, ``pygenn.genn_model.GeNNModel.init_time``, ``pygenn.genn_model.GeNNModel.presynaptic_update_time``, ``pygenn.genn_model.GeNNModel.postsynaptic_update_time``, ``pygenn.genn_model.GeNNModel.synapse_dynamics_time`` and ``pygenn.genn_model.GeNNModel.init_sparse_time``.
1. Kernel timings can now be enabled from python with ``pygenn.GeNNModel.timing_enabled`` and subsequently accessed with ``pygenn.GeNNModel.neuron_update_time``, ``pygenn.GeNNModel.init_time``, ``pygenn.GeNNModel.presynaptic_update_time``, ``pygenn.GeNNModel.postsynaptic_update_time``, ``pygenn.GeNNModel.synapse_dynamics_time`` and ``pygenn.GeNNModel.init_sparse_time``.
2. Backends now generate ``getFreeDeviceMemBytes()`` function to allow free device memory to be queried from user simulation code. This is also exposed to Python via ``GeNNModel.free_device_mem_bytes`` property.
3. GeNN preferences are now fully exposed to PyGeNN by passing kwargs to ``pygenn.genn_model.GeNNModel.__init__``.
3. GeNN preferences are now fully exposed to PyGeNN by passing kwargs to ``pygenn.GeNNModel.__init__``.
4. Logging level can now be seperately specified for GeNN, the code generator, the SpineML generator and the backend and is accessible from PyGeNN.
5. ``CodeGenerator::PreferencesBase::enableBitmaskOptimisations`` flag enables an alternative algorithm for updating synaptic matrices implemented with ``SynapseMatrixConnectivity::BITMASK`` which performs better on smaller GPUs and CPUs. If you are manually initialising matrices this adds padding to align words to rows of the matrix.
6. ``SynapseMatrixConnectivity::PROCEDURAL`` and ``SynapseMatrixWeight::PROCEDURAL`` allow connectivity and synaptic weights to be generated on the fly rather than stored in memory.
Expand Down Expand Up @@ -167,7 +193,7 @@ User Side Changes
8. Add ``CodeGenerator::CUDA::Preferences::generateLineInfo`` option to output CUDA line info for profiling.
9. CUDA backend supports ``half`` datatype allowing memory savings through reduced precision. Host C++ code does not support half-precision types so such state variables must have their location set to ``VarLocation::DEVICE``.
10. If ``ModelSpec::setDefaultNarrowSparseIndEnabled`` is set on a model or ``SynapseGroup::setNarrowSparseIndEnabled`` is set on an individual synapse population with sparse connectivity, 16-bit numbers will be used for postsynaptic indices, almost halving memory requirements.
11. Manual selection of CUDA devices is now exposed to PyGeNN via the ``pygenn.genn_model.GeNNModel.selected_gpu`` property.
11. Manual selection of CUDA devices is now exposed to PyGeNN via the ``pygenn.GeNNModel.selected_gpu`` property.

Bug fixes:
----
Expand Down Expand Up @@ -197,7 +223,7 @@ User Side Changes

Bug fixes:
----
1. Fixed typo in ``pygenn.genn_model.GeNNModel.push_var_to_device`` function in PyGeNN.
1. Fixed typo in ``pygenn.GeNNModel.push_var_to_device`` function in PyGeNN.
2. Fixed broken support for Visual C++ 2013.
3. Fixed zero-copy mode.
4. Fixed typo in tutorial 2.
Expand Down
Loading

0 comments on commit 9d43b7c

Please sign in to comment.