Exponential lookup tables for homogenous STDP synapses #3247
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.
Updated implementation of lookup tables for exponential computations in homogenous STDP synapses (original commits by @suku248 @jarsi), for now just applied to
stdp_pl_synapse_hom
. There are a few potential concerns:Ideally we'd be able to keep
ArchivingNode
as a common base class and support both (potentially) precise spike times as well assize_t
-implemented grid steps, but due to the way history is stored this is impossible without costly conversion on multiple occasions. A dynamic polymorphism approach + conversions was implemented, but did considerably worse in benchmarks (albeit still better than the baseline, see figures below)Since we now require a separate archiving node (could be a static template impl but that also has minor overhead), we also need to duplicate the nodes that support homogenous STDP synapses; we introduced
iaf_psc_alpha_hom
. A better solution would probably require a restructuring for the way archivers are implemented, e.g. as pointers.Some tests still need minor fixes (SLI help required)
In the figures below, "plain" is an implementation that just replaced existing structures for testing purposes while "separate" is the current version with duplicated classes, they are both listed as a sanity check and performance should be the same. "Converted" uses a templated histentry and conversion approach in archiving node. Std and mean values taken over 3 rng seeds.
![exp_tables](https://private-user-images.githubusercontent.com/17948365/346973648-6c4fa44f-3f2f-4b24-ae26-9664caa7bfc6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5MjMzOTcsIm5iZiI6MTcyMzkyMzA5NywicGF0aCI6Ii8xNzk0ODM2NS8zNDY5NzM2NDgtNmM0ZmE0NGYtM2YyZi00YjI0LWFlMjYtOTY2NGNhYTdiZmM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDE5MzEzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlNDZmMDY2YmJkZGU3YTQ3MDRlZTFjNzBhNWJjOWUyNjk2YzEwOTk4YzU1NTAxODQ5YWZlODFhNTdiODk4MjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zWWd-Z3ftUlN_c3Q0poUcnk05cDQOUah_q8oWzO9q1E)
![exp_tables_2](https://private-user-images.githubusercontent.com/17948365/346973687-3b0e6ac0-ab95-4056-884a-81181c08d884.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5MjMzOTcsIm5iZiI6MTcyMzkyMzA5NywicGF0aCI6Ii8xNzk0ODM2NS8zNDY5NzM2ODctM2IwZTZhYzAtYWI5NS00MDU2LTg4NGEtODExODFjMDhkODg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDE5MzEzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZjgyMGIxZGYyNjI2MzBkZmIwOTUzMzRlNzZjNDQ1NDgxZTExZGFmOTA0ZDc1ZWMzODVkN2RjZDNmMjRmNTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Li3Qj-jwfrTwpiE-CdUEuGDqpzdLzQSamVtzZ-t32CQ)