brainpy/BrainPy

Brain Dynamics Programming in Python

What it solves

BrainPy provides a general-purpose programming framework for computational neuroscience and brain-inspired computation. It addresses the difficulty of defining neural models across multiple scales and efficiently simulating, training, and analyzing their dynamics without needing to write native C or CUDA code.

How it works

The framework leverages Just-In-Time (JIT) compilation via JAX and XLA. This allows brain dynamics models defined in Python to be compiled into binary instructions optimized for various hardware, including CPUs, GPUs, and TPUs, achieving performance comparable to native C or CUDA.

Who it’s for

It is designed for researchers in computational neuroscience and those working on brain-inspired computation who need a flexible and extensible tool for building and simulating complex neural models.

Highlights

  • Hardware Acceleration: Supports CPU, CUDA (12.x and 13.x), and TPU execution.
  • JIT Compilation: Uses JAX and XLA for high-performance execution of Python-defined models.
  • Integrative Ecosystem: Includes tools for building, simulation, training, and analysis of brain dynamics.
  • Extensible Architecture: Allows users to easily add new infrastructure, utilities, and machine-learning approaches.

Related

  • Project
  • Project
  • Project
  • Project
  • Project