Merged
Conversation
…ynapsePopulation - like back prop delay, it's got setter
…tz connectivity init snippets from PyGeNN
…tedWarning`` as we want to reach end users!
… attribute to allow deprecatedness to be detected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This has reached the stage where things can't be seperated so nicely so this encompasses the following:
Deletions
Fixes
Stateobject owned byRuntime(previously it was hacked in and just threw an exception if you weren't using CUDA)BITMASKconnectivity, made memory layout the same whatever algorithm is used and moved selection of 'word-packed' algorithm (Bitmask connectivity optimizations #280) to per synapse groupSynapseType::ParallelismHintrather than backend preference.std::mapandstd::setto hash-basedstd::unordered_mapandstd::unordered_setas access time isO(1)rather thanO(log(N))but after much debugging, turns out these containers have a really nasty behaviour that I was totally unaware of. I had always assumed that when you iterated through these containers it did so over the underlying bucket structure which would mean the order would always be the same as long as the hashes remained the same but this is not the case. It's implementation specific but, in the MS and GCC standard libraries, iteration order ends up being insertion order. Most of the time this is fine because we populate most maps once and don't edit them but, nonetheless, hashing these containers for merging etc was dubious at best. This showed up in customUpdate.cc always wanting to recompile itself due to the unordered set holding dynamic parameter names but could cause all kinds of weirdness. Therefore, I've just switched to usingstd::map/std::seteverywhere anything is ever hashed - annoying but non-problematic change as the APIs are identicalNew things
gennrand() % MAXfunction, atomic or (does nothing on CPU) and count-leading-zerosFurther syntax tweaking
SynapseType::SpanTypetoSynapseType::ParallelismHintaddSynapsePopulation. This is now set via a method (property in PyGeNN) like other sorts of delay (the signature for this method has totally changed already so this won't really increase the annoyance of porting models)sim_code,post_learn_codeand friends and (in PyGeNN) added backward compatibility with deprecation warningsModelSpec::addSynapsePopulation,ModelSpec::addCurrentSourceandModelSpec::addCustomConnectivityUpdateall referenced neuron/synapse populations by name - this was inconsistent with variable reference creation syntax, required some ugliness and ModelSpec and didn't match PyGeNN. These functions now take pointersvar_name_typestovarsincreate_XXX_modelPyGeNN methods with backward compatibility + deprecation warningsPython build system
I have made some build system improvements meaning that you can now build PyGeNN from source using a single command on Windows and Linux:
python setup.py developorpip install -e .python setup.py installorpip install .While the build system still uses setuptools "legacy" mode rather than full PEP 517 (https://peps.python.org/pep-0517/), it is enough to enable the pip-based installs to work on Python 3.12 (where directly running
setup.pyis no longer allowed). At some point I will fully PEP 517 it but, currently, various functionality is still missing such as the ability to pass options through pip to setuptools which we use to create debug and coverage PyGeNN builds.