Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
|
Public Member Functions | |
virtual void | setupSim () override |
Set up model state, if anym for a specific simulation run. | |
virtual void | finish () override |
Performs any finalization tasks on network following a simulation. | |
virtual void | advance () override |
Advances network state one simulation step. | |
virtual void | updateConnections () override |
Update the connection of all the vertices and edges of the simulation. | |
virtual void | copyCPUtoGPU () override |
Allocate and Copy CPU Synapse data to GPU. | |
virtual void | copyGPUtoCPU () override |
Prints debug information about the current state of the network. | |
void | printGPUEdgesPropsModel () const |
Print out EdgeProps on the GPU. | |
AllEdgesDeviceProperties *& | getAllEdgesDevice () |
Getter for edge (synapse) structures in device memory. | |
AllVerticesDeviceProperties *& | getAllVerticesDevice () |
Getter for vertex (neuron) structures in device memory. | |
![]() | |
Model () | |
Constructor. | |
virtual | ~Model ()=default |
Destructor. | |
Connections & | getConnections () const |
Returns reference to Connections. | |
Layout & | getLayout () const |
Returns reference to Layout. | |
Recorder & | getRecorder () const |
Returns reference to Recorder. | |
virtual void | saveResults () |
Save simulation results to an output destination. | |
template<class Archive > | |
void | serialize (Archive &archive, std::uint32_t const version) |
Cereal serialization method. | |
Protected Member Functions | |
void | allocDeviceStruct () |
Allocates and initializes memories on CUDA device. | |
virtual void | deleteDeviceStruct () |
Deallocates device memories. | |
![]() | |
void | createAllVertices () |
Creates all the vertices and generates data for them. | |
Protected Attributes | |
float * | randNoise_d |
Pointer to device random noise array. | |
AllEdgesDeviceProperties * | allEdgesDevice_ |
edge structures in device memory. | |
AllVerticesDeviceProperties * | allVerticesDevice_ |
vertex structure in device memory. | |
![]() | |
unique_ptr< Connections > | connections_ |
unique_ptr< Layout > | layout_ |
unique_ptr< Recorder > | recorder_ |
log4cplus::Logger | fileLogger_ |
Friends | |
class | GpuSInputPoisson |
Definition at line 66 of file GPUModel.h.
GPUModel::GPUModel | ( | ) |
Definition at line 28 of file GPUModel.cpp.
|
overridevirtual |
Advances network state one simulation step.
Advance everything in the model one time step. In this case, that means calling all of the kernels that do the "micro step" updating (i.e., NOT the stuff associated with growth).
Implements Model.
Definition at line 138 of file GPUModel.cpp.
|
protected |
Allocates and initializes memories on CUDA device.
Definition at line 52 of file GPUModel.cpp.
|
overridevirtual |
Allocate and Copy CPU Synapse data to GPU.
Copies neuron and synapse data from CPU to GPU memory. TODO: Refactor this. Currently, GPUModel handles low-level memory transfer for vertices and edges. Consider moving this responsibility to a more appropriate class, such as a dedicated memory manager or the OperationManager, to better separate concerns and keep the model focused on high-level coordination.
Implements Model.
Definition at line 283 of file GPUModel.cpp.
|
inlineoverridevirtual |
Prints debug information about the current state of the network.
Copy GPU Edge data to CPU.
Implements Model.
Definition at line 95 of file GPUModel.h.
|
protectedvirtual |
Deallocates device memories.
Copies device memories to host memories and deallocates them.
Definition at line 64 of file GPUModel.cpp.
|
overridevirtual |
Performs any finalization tasks on network following a simulation.
Implements Model.
Definition at line 122 of file GPUModel.cpp.
AllEdgesDeviceProperties *& GPUModel::getAllEdgesDevice | ( | ) |
Getter for edge (synapse) structures in device memory.
Getter for synapse structures in device memory.
Definition at line 342 of file GPUModel.cpp.
AllVerticesDeviceProperties *& GPUModel::getAllVerticesDevice | ( | ) |
Getter for vertex (neuron) structures in device memory.
Getter for neuron structure in device memory.
Definition at line 336 of file GPUModel.cpp.
void GPUModel::printGPUEdgesPropsModel | ( | ) | const |
Print out EdgeProps on the GPU.
Definition at line 330 of file GPUModel.cpp.
|
overridevirtual |
Set up model state, if anym for a specific simulation run.
Sets up the Simulation.
Reimplemented from Model.
Definition at line 81 of file GPUModel.cpp.
|
overridevirtual |
Update the connection of all the vertices and edges of the simulation.
Modifies connections between vertices based on current state of the network and behavior over the past epoch. Should be called once every epoch.
Implements Model.
Definition at line 230 of file GPUModel.cpp.
|
friend |
Definition at line 67 of file GPUModel.h.
|
protected |
edge structures in device memory.
Definition at line 124 of file GPUModel.h.
|
protected |
vertex structure in device memory.
Definition at line 127 of file GPUModel.h.
|
protected |
Pointer to device random noise array.
Definition at line 116 of file GPUModel.h.