This repo contains example applications utilizing the VRISP neuroprocesser, along with benchmarks comparing it to the current RISP implementation.
This repo utilizes git submodules, which require an additional flag when cloning.
git clone --recurse-submodules https://github.com/jacksonmowry/vrisp.git
The makefile does nothing fancy, it simply makes the dependencies and then the actual apps for the processors we will be testing.
If you’re building for any platform that is not RISCV64 with the 1.0 vector extension, you should compile with the following.
make
To build the full suite of processors you can use the full makefile.
make riscv_vector
Due to the lack of hardware supporting the RISCV Vector 1.0 extension it is more approachable to develop with an emulator. I won’t go into detail on setting up QEMU but they should have plenty of documentation for your platform.
make riscv_vector CXX='riscv64-linux-gnu-g++' CFLAGS='-march=rv64gcv -Ofast -static'
You can of course substitute whichever particular compiler is present on your platform.
The script scripts/dbscan_benchmark.bash
simulates inputs from an event based camera to six dbscan networks. These networks are generated using the TENNLab dbscan Repo.
If you build the apps to support vector processing run the following:
bash scripts/dbscan_benchmark.bash $HOSTNAME vector
Otherwise:
bash scripts/dbscan_benchmark.bash $HOSTNAME
The script requires an experiment prefix, which is added to the beginning of all output files to help organize results. If you’re only concerned about which machine is running the tests you can supply $HOSTNAME
as the argument.
Epsilon | Min. Pts. | Neurons | Synapses | Average Fan-out |
---|---|---|---|---|
1 | 7 | 2340 | 6488 | 2.77 |
2 | 18 | 3380 | 15800 | 4.67 |
3 | 36 | 4420 | 29212 | 6.91 |
4 | 60 | 5460 | 46700 | 8.55 |
5 | 90 | 6500 | 68240 | 10.50 |
6 | 120 | 7540 | 93808 | 12.44 |
Epsilon 1, Min. Pts. 7
Epsilon 2, Min. Pts. 18
$ bash scripts/connectivity_benchmark.bash
usage: scripts/connectivity_benchmark.bash experiment_prefix empty_network num_neurons connectivity_chance num_inputs total_timesteps activity_max [vector_mode]
The script scripts/connectivity_benchmark.bash
generates networks with a specified number of neurons, a connectivity change, and the number of input neurons. The network is then tested on all processors for a given number of time steps, with activity ranging from 0-activity_max
. You can use the script to test specific network parameters or a range of different networks.
The script requires an experiment prefix, which is added to the beginning of all output files to help organize results. If you’re only concerned about which machine is running the tests you can supply $HOSTNAME
as the argument.
$ bash scripts/connectivity_benchmark.bash $HOSTNAME networks/risp_1.json 100 2 3 5 5 vector
#+PLOT: title:"5 Time Steps: Neurons: 100, Synapses: 186, Mean Fan-out: 1.86, Connectivity Chance: 2%"
#+PLOT: file:"hostname_100_186_1p86_2percent.svg"
#+PLOT: set:"rmargin 8" set:"size ratio 0.5" set:"yrange [0:*]" with:"lines lw 2"
#+PLOT: set:"xlabel 'Activity Percent'" set:"ylabel 'Time (Seconds)'"
#+PLOT: ind:1 set:"key below horizontal"
#+PLOT: labels:("x" "risp" "vrisp" "vr_full" "vr_fired" "vr_synapses" )
| _ | risp | vrisp | vr_full | vr_fired | vr_synapses |
| 0% | 0.00048030 | 0.00038873 | 0.00075584 | 0.00072111 | 0.00037042 |
| 1% | 0.00047348 | 0.00034136 | 0.00075009 | 0.00063839 | 0.00034012 |
| 2% | 0.00045733 | 0.00032405 | 0.00075986 | 0.00063398 | 0.00033554 |
| 3% | 0.00043043 | 0.00032630 | 0.00064985 | 0.00078074 | 0.00036983 |
| 4% | 0.00041081 | 0.00032519 | 0.00073086 | 0.00074261 | 0.00035851 |
| 5% | 0.00041206 | 0.00035779 | 0.00067448 | 0.00076324 | 0.00036853 |
The script scripts/connectivity_benchmark_full.bash
is an example of a simple wrapper around the previous script. It generates networks with neuron counts ranging from 5-250
, and connectivity chances ranging from 5-100%
. Feel free to write your own simple wrapper, or modify the existing one to suit your needs.
15 Neurons, 20% Connectivity Chance
250 Neurons, 15% Connectivity Chance
scrips/bars_stripes_benchmark.bash experiment_prefix [vector]
$ bash scripts/bars_stripes_benchmark.bash $HOSTNAME
#+PLOT: title:"Bars Stripes Calculations per Second 4x4"
#+PLOT: file:"hostname_bar_stripe_4.svg"
#+PLOT: set:"rmargin 8" set:"size ratio 0.5" set:"yrange [0:*]" with:"lines lw 2"
#+PLOT: set:"xlabel 'Activity Percent'" set:"ylabel 'Calculations per Second'"
#+PLOT: ind:1 set:"key below horizontal"
#+PLOT: labels:("x" "risp" "vrisp")
| _ | risp | vrisp |
| 0% | 4106776.1806981522 | 2132650.8850501170 |
| 1% | 3711952.4870081660 | 1838573.2671446956 |
| 2% | 3491620.1117318431 | 2195389.6816684962 |
| 3% | 3469812.6301179738 | 2145922.7467811159 |
...
The script scripts/bars_stripes_benchmark.bash
runs through various square networks which compute if there is either a full bar, full stripe, or both in the input data. This equates to a full row, column, or both respectively.
The script requires and experiment prefix which helps identify which machine or environment the test is being run on.
The data from the desktop run is very dirty, even when averaging across 1000 simulation attempts. I'll take a look at this in the future to see what can be done to eliminate these inconsistencies.
22x22 Bar Stripe Network
1000x1000 Bar Stripe Network