{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "installation-title",
   "metadata": {},
   "source": [
    "# Installation\n",
    "\n",
    "BrainTrace requires Python 3.11 or newer. Choose the command that matches the accelerator available on your machine; install only one JAX backend in an environment.\n",
    "\n",
    "## Choose a backend\n",
    "\n",
    "### CPU\n",
    "\n",
    "```bash\n",
    "pip install -U braintrace[cpu]\n",
    "```\n",
    "\n",
    "### NVIDIA GPU (CUDA 12)\n",
    "\n",
    "```bash\n",
    "pip install -U braintrace[cuda12]\n",
    "```\n",
    "\n",
    "### NVIDIA GPU (CUDA 13)\n",
    "\n",
    "```bash\n",
    "pip install -U braintrace[cuda13]\n",
    "```\n",
    "\n",
    "### TPU\n",
    "\n",
    "```bash\n",
    "pip install -U braintrace[tpu]\n",
    "```\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "verify-installation",
   "metadata": {},
   "source": [
    "## Verify the installation\n",
    "\n",
    "Run one command in the same environment. It should print the installed BrainTrace version and at least one JAX device.\n",
    "\n",
    "```bash\n",
    "python -c \"import braintrace, jax; print('BrainTrace:', braintrace.__version__); print('JAX devices:', jax.devices())\"\n",
    "```\n",
    "\n",
    "If the device list does not show the accelerator you expected, check the JAX installation for that backend before continuing.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "installation-next",
   "metadata": {},
   "source": [
    "## Next step\n",
    "\n",
    "Continue to the [Quickstart](quickstart.ipynb) to compile a MiniGRU and run a complete online-gradient update.\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
