Skip to content

Conversation

@NicolasJPosey
Copy link
Contributor

Closes #745

Description

The summation point logic was being done in the neuron edges for the CPU model while the GPU model had a calcSummationPoint method that handled the GPU-side summation point logic. The feature branch refactors this by introducing a integrateVertexInputs method to AllVertices for both CPU and GPU. The neuron implementation of AllVertices can then implement the summation point logic in this method. This refactor also allows models types other than neuron (such as 911) to define how they want to integration their vertex inputs since not all model types will use summation point logic.

Checklist (Mandatory for new features)

  • Added Documentation
  • Added Unit Tests

Testing (Mandatory for all changes)

  • GPU Test: test-medium-connected.xml Passed
  • GPU Test: test-large-long.xml Passed

@NicolasJPosey NicolasJPosey added GPU refactor doesn't change functionality, just improves code labels Jan 26, 2025
@NicolasJPosey NicolasJPosey self-assigned this Jan 26, 2025
@NicolasJPosey
Copy link
Contributor Author

@stiber ran the GPU unit and regression tests as well and they all passed so I think this change is ready for a review.

@stiber
Copy link
Contributor

stiber commented Jan 29, 2025

Nick, did you want to request a review from me? That's done under "reviewers", not "assignees"...

@NicolasJPosey
Copy link
Contributor Author

@stiber yes, that was my intention. Sorry about that. I will switch that around.

Copy link
Contributor

@stiber stiber left a comment

Choose a reason for hiding this comment

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

Some small-ish things.

@NicolasJPosey
Copy link
Contributor Author

@stiber all changes have been made and all tests have been run and are passing.

@NicolasJPosey NicolasJPosey merged commit 3e1790f into PoseyDevelopment Feb 3, 2025
2 checks passed
@NicolasJPosey NicolasJPosey deleted the issue-745-refactor-where-summation-is-calculated branch February 3, 2025 23:32
NicolasJPosey added a commit that referenced this pull request Feb 19, 2025
* [issue-745] Refactor where summation is calculated (#777)

* Refactor model class to generalize the summation logic method and move implementation into neuron class

* Implement new AllVertices method in 911 class

* Fix last compile errors

* Clean up commented out code

* Resolve code format failure

* Remove dynamic cast of vertices so model with work with non-neuron models

* Add override keyword to integrateVertexInputs declaration

* Fix formatting issue

* [issue-785] Remove neuro items from gpu model (#789)

* Rename edge index map device variable name

* Rename method names to remove neuro context

* Rename variables both in method signature and implementation

* Fix formatting

* Remove neuro from GPU model and generalize what we can

* Remove summation point operation as it's now done in the neuro vertices base class

* Revert formatting that breaks code style

* Clean up comments, variable names, and includes

* Move edge sum index into all spiking synapses and rename neuro GPU methods in both edges and vertices

* Fix style violation

* Make corresponding updates to documentation

* Re add serialize method to documentation

* Fix const representation

* Add All911Edges to connections documentation

* Update diagram images
NicolasJPosey added a commit that referenced this pull request Mar 13, 2025
* [issue-745] Refactor where summation is calculated (#777)

* Refactor model class to generalize the summation logic method and move implementation into neuron class

* Implement new AllVertices method in 911 class

* Fix last compile errors

* Clean up commented out code

* Resolve code format failure

* Remove dynamic cast of vertices so model with work with non-neuron models

* Add override keyword to integrateVertexInputs declaration

* Fix formatting issue

* [issue-785] Remove neuro items from gpu model (#789)

* Rename edge index map device variable name

* Rename method names to remove neuro context

* Rename variables both in method signature and implementation

* Fix formatting

* Remove neuro from GPU model and generalize what we can

* Remove summation point operation as it's now done in the neuro vertices base class

* Revert formatting that breaks code style

* Clean up comments, variable names, and includes

* Move edge sum index into all spiking synapses and rename neuro GPU methods in both edges and vertices

* Fix style violation

* Make corresponding updates to documentation

* Re add serialize method to documentation

* Fix const representation

* Add All911Edges to connections documentation

* Update diagram images

* Add small 911 test to RunTests (#804)

Moved small 911 test into Cpu subfolder since it was generated with Cpu code. This required corresponding update to github actions. Then updated RunTests so that it would build the appropriate list of tests based on the current processing unit.

* [issue-806] Implement integrateVertexInputs in All911Vertices (#807)

* Implement integrateVertexInputs in All911Vertices

Since advanceEdges doesn't update the edge state until after we know that we can transfer the call, we move all of the advanceEdges logic into integrateVertexInputs.

* fix style issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GPU refactor doesn't change functionality, just improves code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor summation point logic in CPU neuron model to better align with GPU model

3 participants