Skip to main content

A Brian2 extension to simulate spiking neural networks on GPUs

Project description

Brian2CUDA

Brian2CUDA is an extension of the spiking neural network simulator Brian2, written in Python. It generates C++/CUDA code to run simulations on NVIDIA GPUs.

For support, please use the Brian forum. If you think you found a bug in Brian2CUDA, please report it at the GitHub issue tracker.

For installation and usage instructions, check out the Brian2CUDA documentation. For information on general Brian2 usage, check out the Brian2 documentation.

Quick start

Installation

You can install Brian2CUDA via pip:

python -m pip install brian2cuda

This will install a compatible version of Brian2 as dependency. For installation requirements and GPU configuration, check out the Brian2CUDA documentation.

Usage

Use your Brian2 code (see Brian2 documentation) and modify the imports to:

# Standard Brian2 import
from brian2 import *

# Enable GPU usage via Brian2CUDA
import brian2cuda
set_device("cuda_standalone")

See Brian2's standalone code generation for more options for the set_device call.

Citation

If you use this software in a published article, please cite our Brian2CUDA publication:

Alevi, D, Stimberg, M, Sprekeler, H, Obermayer, K, Augustin, M. “Brian2CUDA: flexible and efficient simulation of spiking neural network models on GPUs” Frontiers in Neuroinformatics (2022). doi: 10.3389/fninf.2022.883700.

License

Brian2CUDA is free software licensed under the GNU General Public License v3 (GPLv3).

Testing

To run the test suite on Google Collab (no installation or GPU required), click on the badge below:

Open In Collab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brian2cuda-1.0a6.tar.gz (218.1 kB view details)

Uploaded Source

Built Distribution

Brian2Cuda-1.0a6-py3-none-any.whl (205.9 kB view details)

Uploaded Python 3

File details

Details for the file brian2cuda-1.0a6.tar.gz.

File metadata

  • Download URL: brian2cuda-1.0a6.tar.gz
  • Upload date:
  • Size: 218.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for brian2cuda-1.0a6.tar.gz
Algorithm Hash digest
SHA256 2d5f2412f1513a9156fd2fedbab26d3f59a7d7ac77300e14057783d0650e7d91
MD5 438edcc2416828912ccfb7a4b7d95d52
BLAKE2b-256 456c033d068f2e473e041018763382691dd0dd7e54509ce3095ca84f7f26b1fd

See more details on using hashes here.

File details

Details for the file Brian2Cuda-1.0a6-py3-none-any.whl.

File metadata

  • Download URL: Brian2Cuda-1.0a6-py3-none-any.whl
  • Upload date:
  • Size: 205.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for Brian2Cuda-1.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 8556864fb850e3b61f31cf148a496cb7185fb5acbf99fc05a557b4b100c055c3
MD5 dab3c253ea72ccacf5d4cf5e7696eaa9
BLAKE2b-256 df0d420bd4468c6142069ec09ec06ff448d5a2b2a1d71129f3a0a58c0e3f431f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page