Implementation of Izhikevich spiking
neurons running on the CPU
and in compute shaders on the GPU using
wgpu-rs
. Mostly an excuse for trying
out compute shaders and GPU programming.
Replicate the setup from 0.1 but make it run and graph continuously.
Currently working but graphing the individual spikes is extremely slow. I think it's more due to using the graphing library in ways it wasn't meant to be used.
The no-spikes
flag will only draw neuron 0's voltage over time which is
significantly faster.
A replication of the example code in the the paper that produces a similar graph output.
Should Just Work™ but I found on Windows, compiling shaderc
from source
used up computer-breaking amounts of RAM so I had to use the
prebuilt lib and the
SHADERC_LIB_DIR
envvar option.
Default is running on the GPU
cargo run -- 1000
To use the CPU:
cargo run -- --cpu 1000
The resulting graph defaults to ./out.png
but can be changed.
Increasing the number of neurons increases RAM usage exponentially due to the dense connection matrix.