Skip to content

Comments

Add ISPC Backend for GeNN#710

Open
JRV7903 wants to merge 83 commits intogenn-team:ispcfrom
JRV7903:ISPC
Open

Add ISPC Backend for GeNN#710
JRV7903 wants to merge 83 commits intogenn-team:ispcfrom
JRV7903:ISPC

Conversation

@JRV7903
Copy link
Contributor

@JRV7903 JRV7903 commented Sep 1, 2025

This PR introduces an ISPC backend for GeNN as part of Google Summer of Code 2025.

JRV7903 and others added 30 commits June 26, 2025 00:28
Change VarLocation to HOST for CPU
Implementation of the Array class and the Preference class
Modified the Single Threaded Neuron update implementation to accommodate parallelism.
Create seperate ISPC file for neuron update kernel
- streamCreator is used to create two streams, one for .ispc and the other for .cc
- Introduced the build method to compile all generated ISPC files and link them into a shared library, handling all modules and enabling error logging. This method is incomplete.
- Implemented getRestrictKeyword, conditional compilation for platform-specific code, and provided genMakefilePreamble, genMakefileLinkRule, and genMakefileCompileRule to enable builds and file generation.
-backend name typo has been corrected in optimiser.cc
-Known issues: Occasional inconsistent file generation and missing DLL error (code 126) during runtime.
This commit removes the previously implemented build method. I guess separate handling was redundant and not required in the first place.
- Code stream now handles the cc files too
- Object files have been added to MakefilePreamle
- Dependency generation rule has been added to MakefileCompileRule
* use functionality to add seperate ISPC objects
1. Fixing CodeStream usage to correctly use the provided 'os' stream for C++ code while creating separate streams only for ISPC files.
1. C++ code uses the os stream while codestream is used for ispc only
2. The auto keyword from the Single Threaded CPU backend has been replaced with the uniform keyword
3. C++ wrapper functions have been implemented that call the corresponding ISPC functions
Structs definitions have been moved from ISPC to C++
return type.getname() for getMergedGroupFieldHostTypeName
* ISPC-generated headers have ISPC at the end
* t needs to be uniform
neworderofjamie and others added 30 commits August 6, 2025 17:10
- Added method to find out if ISPC is installed and if so then add it to the list of backends
- create the ispc backend file in pygenn similar to the single threaded cpu backend file
- accommodate the ISPC backend
- Add ISPC compiler detection and build target to main Makefile
- Fix namespace reference from Utils::updateHash to GeNN::Utils::updateHash
- Resolves linker error: unresolved external symbol updateHash
- Added dendritic delay, synapse dynamics and postsynaptic code to genSynapseUpdate
- Implemented genPostsynapticUpdate
- These implementations follow the Single threaded CPU backend but with parallelization for loops over neurons.
- Added custom update method similar to the single threaded CPU backend but with parallelization
- Added genWriteBackReductions methods required for custom update implementation
- Added missing includes in genDefinitionsPreamble
- removed uniform keyword usage from MergedCustomUpdateInitGroup reference.
- Excluded ispc backend from tests with batch_size > 1
- getUniformKeyword added to backendBase will return an empty string for all other backends and the uniform keyword for ISPC.
- To handle uniform type conversion for reductions in ISPC, reduce_add and reduce_max is used
- ISPC uses max instead fmax and so on, these have been declared too
…otOffset

- resolves one of the varying to uniform error in neuronUpdate.ispc file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants