GeNN
3.3.0
GPU enhanced Neuronal Networks (GeNN)
|
Main file combining the code for code generation. Part of the code generation section. More...
#include "global.h"
#include "generateALL.h"
#include "generateCPU.h"
#include "generateInit.h"
#include "generateKernels.h"
#include "generateMPI.h"
#include "generateRunner.h"
#include "modelSpec.h"
#include "utils.h"
#include "codeGenUtils.h"
#include "codeStream.h"
#include <algorithm>
#include <cmath>
#include <iterator>
#include <sys/stat.h>
#include <MODEL>
Functions | |
void | generate_model_runner (const NNmodel &model, const string &path, int localHostID) |
This function will call the necessary sub-functions to generate the code for simulating a model. More... | |
void | chooseDevice (NNmodel &model, const string &path, int localHostID) |
Helper function that prepares data structures and detects the hardware properties to enable the code generation code that follows. More... | |
int | main (int argc, char *argv[]) |
Main entry point for the generateALL executable that generates the code for GPU and CPU. More... | |
Main file combining the code for code generation. Part of the code generation section.
The file includes separate files for generating kernels (generateKernels.cc), generating the CPU side code for running simulations on either the CPU or GPU (generateRunner.cc) and for CPU-only simulation code (generateCPU.cc).
void chooseDevice | ( | NNmodel & | model, |
const string & | path, | ||
int | localHostID | ||
) |
Helper function that prepares data structures and detects the hardware properties to enable the code generation code that follows.
The main tasks in this function are the detection and characterization of the GPU device present (if any), choosing which GPU device to use, finding and appropriate block size, taking note of the major and minor version of the CUDA enabled device chosen for use, and populating the list of standard neuron models. The chosen device number is returned.
model | the nn model we are generating code for |
path | path the generated code will be deposited |
localHostID | ID of local host |
void generate_model_runner | ( | const NNmodel & | model, |
const string & | path, | ||
int | localHostID | ||
) |
This function will call the necessary sub-functions to generate the code for simulating a model.
ID of local host
model | Model description |
path | Path where the generated code will be deposited |
localHostID | ID of local host |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main entry point for the generateALL executable that generates the code for GPU and CPU.
The main function is the entry point for the code generation engine. It prepares the system and then invokes generate_model_runner to inititate the different parts of actual code generation.
argc | number of arguments; expected to be 2 |
argv | Arguments; expected to contain the target directory for code generation. |