synsense / sinabs

A deep learning library for spiking neural networks which is based on PyTorch, focuses on fast training and supports inference on neuromorphic hardware.
https://sinabs.readthedocs.io
GNU Affero General Public License v3.0
78 stars 8 forks source link

Which neuromorphic hardware does Sinabs use to simulate SNNs ? #53

Closed sauravtii closed 1 year ago

sauravtii commented 2 years ago

Hello,

I have been recently using Sinabs, but I am still not sure which neuromorphic hardware does it simulate ? For example, I am running this code and I can see that we are getting an SNN model but which neuromorphic hardware does Sinabs use to simulate the SNN ?

biphasic commented 2 years ago

Hello @sauravtii, glad that you're running some notebooks. Sinabs itself is not tied to a particular hardware, much like PyTorch can execute the same calculations on different hardware (CPU/GPU). Sinabs implements different neuron models such as Integrate and Fire (IAF) or Leaky Integrate and Fire (LIF), which define how to process sequential inputs. How exactly those calculations are then executed depends on the hardware. CPU and GPU provide deterministic results given the same random seed. Their support is baked into PyTorch. We at SynSense provide a separate package sinabs-dynapcnn that offers support for our neuromorphic hardware: https://synsense.gitlab.io/sinabs-dynapcnn/ So if you specify a network in Sinabs, you can then use sinabs-dynapcnn to convert it to a model that fits on our chip and only then execute it on our hardware. Our chip called Speck has some stochastic elements, so the same input will not always produce the same output. Let me know if you have any further questions. Please also consider joining our Discord channel for discussions https://discord.gg/V6FHBZURkg

saurav935 commented 1 year ago

Okay, thanks for the information. Is there any way that I can measure the energy consumption of the neuromorphic hardware (Speck) ?

biphasic commented 1 year ago

hello, I've never tried it myself but you could check out the documentation here: https://synsense-sys-int.gitlab.io/samna/howto.html?highlight=power#test-power-measurements