Knight James C, Komissarov Anton, Nowotny Thomas
Centre for Computational Neuroscience and Robotics, School of Engineering and Informatics, University of Sussex, Brighton, United Kingdom.
Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany.
Front Neuroinform. 2021 Apr 22;15:659005. doi: 10.3389/fninf.2021.659005. eCollection 2021.
More than half of the Top 10 supercomputing sites worldwide use GPU accelerators and they are becoming ubiquitous in workstations and edge computing devices. GeNN is a C++ library for generating efficient spiking neural network simulation code for GPUs. However, until now, the full flexibility of GeNN could only be harnessed by writing model descriptions and simulation code in C++. Here we present PyGeNN, a Python package which exposes all of GeNN's functionality to Python with minimal overhead. This provides an alternative, arguably more user-friendly, way of using GeNN and allows modelers to use GeNN within the growing Python-based machine learning and computational neuroscience ecosystems. In addition, we demonstrate that, in both Python and C++ GeNN simulations, the overheads of recording spiking data can strongly affect runtimes and show how a new spike recording system can reduce these overheads by up to 10×. Using the new recording system, we demonstrate that by using PyGeNN on a modern GPU, we can simulate a full-scale model of a cortical column faster even than real-time neuromorphic systems. Finally, we show that long simulations of a smaller model with complex stimuli and a custom three-factor learning rule defined in PyGeNN can be simulated almost two orders of magnitude faster than real-time.
全球排名前十的超级计算站点中,超过半数都使用了GPU加速器,并且它们在工作站和边缘计算设备中变得越来越普遍。GeNN是一个C++库,用于为GPU生成高效的脉冲神经网络模拟代码。然而,到目前为止,只有通过用C++编写模型描述和模拟代码,才能充分利用GeNN的全部灵活性。在此,我们展示了PyGeNN,这是一个Python包,它以最小的开销将GeNN的所有功能暴露给Python。这提供了一种使用GeNN的替代方式,且可以说更加用户友好,还允许建模人员在基于Python不断发展的机器学习和计算神经科学生态系统中使用GeNN。此外,我们证明,在Python和C++的GeNN模拟中,记录脉冲数据的开销会强烈影响运行时间,并展示了一种新的脉冲记录系统如何能够将这些开销减少多达10倍。使用新的记录系统,我们证明,在现代GPU上使用PyGeNN,我们甚至可以比实时神经形态系统更快地模拟皮质柱的全尺寸模型。最后,我们表明,对一个具有复杂刺激的较小模型进行长时间模拟,并使用在PyGeNN中定义的自定义三因素学习规则,其模拟速度可比实时快近两个数量级。