I’ve created a custom neuron type based on the Nengo page describing how to add an object to Nengo. I followed the steps from the Nengo Loihi page to simulate on Loihi but I got an error saying the neuron type cannot be simulated on Loihi and to either switch to a supported neuron type or explicitly mark ensembles as off-chip.
I saw there was a post in February about the same error I got and part of the solution was to configure the ensemble to run off chip or swap the activation with a supported one. However, I do want to use this custom neuron type rather than swap to a supported type and I want to run it on Loihi, not my CPU. In the other post a reply said another option is to register a builder function with the Nengo-Loihi builder to build it into the hardware using Loihi primitives, but that this is pretty involved.
Could you explain how to go about registering such a builder function or if there are other solutions that allow me to simulate my custom neuron type on Loihi?
Thank you very much!
The types of neurons that can be simulated on Loihi are much more restricted than those that can be simulated on a standard CPU, because the neuron implementations are built into the hardware itself. So unfortunately you cannot take an arbitrary neuron model and run it on Loihi. If you want to write your own neuron model you would need to define its implementation using Loihi’s programming language (NxSDK), and then you could hook that NxSDK implementation into Nengo by registering a builder function as you mention. But the key factor is that the implementation needs to be done in NxSDK, due to the way Loihi works, you won’t be able to use your existing implementation. And depending on what your neuron model looks like, it may not be possible to simulate it directly on the Loihi regardless (if it can’t be expressed in the Loihi hardware). You can take a look at the NengoLoihi neuron implementations (starting here https://github.com/nengo/nengo-loihi/blob/master/nengo_loihi/builder/ensemble.py#L144) if you want an example of how that might look.
Thanks for the reply! Would this also be the case for custom learning rules?