In 2012 I had a summer job working for @FurberSteve at @csmcr writing ray & path tracer demos for their SpiNNaker computer architecture (designed for spiking neural network simulations). At the time I was working with a four ARM chip dev. board, and the I/O was really limited 1/
The current SpiNNaker machine has 1,036,800 cores, and the aim is to simulate networks of up to 1 billion spiking neurons in real time. Some more info on the machine here: 2/
The ray tracer video above is speckled because it was rendered in real time (only 240x200 pixels), with each core handling a different patch of the image and sending packets out to the host. Some pixels are from the previous frame when packets arrive too late 3/
I also wrote a path tracer for SpiNNaker, but looking bath I think the refraction was broken 4/
A fun detail about the ray and path tracer demos is that I only wrote code for finding intersections with spheres, so the walls and floor are actually the surfaces of extremely large spheres 5/
One challenge with using SpiNNaker for spiking network simulation is getting the specification of the network onto it; the full machine has 7 TB of RAM, and I/O is still fairly limited; you don't want to send all of that over. It's common when simulating spiking networks... 6/
to specify connectivity patterns probabilistically, so I worked on the project again for a few months in 2017, with @neworderofjamie, on sampling from various distributions on SpiNNaker, which was sometimes tricky because of the distributed nature of the machine 7/
The source code for the path tracer is here: https://github.com/SpiNNakerManchester/spinnaker_tools/blob/master/apps/pt_demo/tracer.c. Part of the reason it's so verbose is that the SpiNNaker chips didn't have floating point units, so there's a lot of bit-shifting around to avoid over- and underflow 9/
I was a little hesitant to share the code. I'm sure I handled some of the fixed-point arithmetic tricks and approximations naively. But hey, it's 8 year old code and I'm sure I've improved since! 10/
What I've described in this thread are two times I was a bit player (!) in a large project that has employed a very large number of software engineers and researchers 11/
To finish, here's how quickly the small dev. board could render a 2456x2048 image 12/12
You can follow @AndrewM_Webb.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: