Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nasty bugs in custom update kernels #439

Merged
merged 4 commits into from
Jul 22, 2021
Merged

Conversation

neworderofjamie
Copy link
Contributor

Two really nasty bugs have come to light as I've started building models which do more complex stuff with custom updates:

Firstly, we were building the group start indices (the arrays that get binary searched to find the index to the right data if groups get merged) across all custom update groups. This is clearly wrong as separate kernel(s) are generated for each update group.

Secondly, in the CUDA kernel, the group start indices for custom updates and custom weight updates weren't being generated together so if there were enough of either to require binary searching there would be problems.

@neworderofjamie
Copy link
Contributor Author

neworderofjamie commented Jul 20, 2021

Ironically, in parallel, I was adding some new functionality and extending the tests to cover it and these were starting to fail because of the second of these issues so the testing was nearly good enough 😟

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #439 (ea2f548) into master (1d46a69) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
+ Coverage   87.91%   87.94%   +0.03%     
==========================================
  Files          78       78              
  Lines       16445    16494      +49     
==========================================
+ Hits        14457    14506      +49     
  Misses       1988     1988              
Impacted Files Coverage Δ
src/genn/backends/cuda/backend.cc 88.22% <100.00%> (+0.23%) ⬆️
src/genn/backends/opencl/backend.cc 92.39% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d46a69...ea2f548. Read the comment docs.

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.

Sorry for delay. I will have to trust you on the details on this one.
Is there a very typical case you can add as a test?

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.

Then I would say, let's go ahead and merge these.

@neworderofjamie neworderofjamie merged commit 2dfd51f into master Jul 22, 2021
@neworderofjamie neworderofjamie deleted the custom_update_merge_fix branch July 22, 2021 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants