Skip to content

Batched prev spike time#565

Merged
neworderofjamie merged 3 commits intomasterfrom
batched_prev_spike_time
Feb 13, 2023
Merged

Batched prev spike time#565
neworderofjamie merged 3 commits intomasterfrom
batched_prev_spike_time

Conversation

@neworderofjamie
Copy link
Contributor

@neworderofjamie neworderofjamie commented Feb 6, 2023

Two fixes here:

  1. Missing numNeurons field in NeuronPrevSpikeTimeUpdateGroupMerged required when model has batch size > 1. Not 100% sure why batch size isn't readily available in this constructor but unconditionally including the number of neurons is fine
  2. Indexing when updating previous spike times was incorrect when model is batched but there are no delays (both group->prevST and group->spk are num_batches * num_neurons size arrays so indices into both need to have batchOffset adding to them)

I have also updated the feature test which nearly covered this to actually do so!

Fixes #564

@neworderofjamie neworderofjamie added this to the GeNN 4.9.0 milestone Feb 6, 2023
@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Base: 88.80% // Head: 89.31% // Increases project coverage by +0.51% 🎉

Coverage data is based on head (1063c0a) compared to base (dc50d25).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #565      +/-   ##
==========================================
+ Coverage   88.80%   89.31%   +0.51%     
==========================================
  Files          76       76              
  Lines       12358    12359       +1     
==========================================
+ Hits        10975    11039      +64     
+ Misses       1383     1320      -63     
Impacted Files Coverage Δ
src/genn/genn/code_generator/backendSIMT.cc 94.79% <40.00%> (+0.94%) ⬆️
src/genn/genn/code_generator/groupMerged.cc 86.94% <100.00%> (-0.02%) ⬇️
src/genn/backends/opencl/backend.cc 92.45% <0.00%> (+0.99%) ⬆️
include/genn/genn/code_generator/backendBase.h 88.00% <0.00%> (+1.33%) ⬆️
src/genn/backends/cuda/optimiser.cc 81.51% <0.00%> (+10.30%) ⬆️
src/genn/backends/opencl/optimiser.cc 95.45% <0.00%> (+18.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@tnowotny tnowotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that looks like I would have expected. Mysterious that testing for batchsize > 1 is so elusive in the definition of the update group but indeed not much harm done to include numNeurons always.
Also Fabian has confirmed his code now works as he expected.

@neworderofjamie neworderofjamie merged commit 000dd7f into master Feb 13, 2023
@neworderofjamie neworderofjamie deleted the batched_prev_spike_time branch February 13, 2023 09:12
@neworderofjamie neworderofjamie modified the milestones: GeNN 4.9.0, GeNN 4.8.1 Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compilation fails when using batch sizes larger than 1 in combination with is_prev_post_spike_time_required=True

2 participants