# BrainChip

### Akida (Brainchip) Runtime in PySDK

PySDK supports version **2.11.0** of Akida Runtime.

#### Supported Platforms

**Linux**

* **Architecture**: x86-64 or ARM64/AArch64
* **Python Versions**: 3.9–3.11

***

### Installation

Ensure your pip is up to date and install the Akida Runtime package:

{% code overflow="wrap" %}

```bash
pip install --upgrade pip
pip install akida==2.11.0
```

{% endcode %}

You can verify the installation by running the following command:

{% code overflow="wrap" %}

```bash
akida version
```

{% endcode %}

You can check available Brainchip devices by running the following command:

{% code overflow="wrap" %}

```bash
akida devices
```

{% endcode %}

{% hint style="danger" %}
REQUIRED: Add Akida Runtime to LD\_LIBRARY\_PATH
{% endhint %}

For PySDK to locate Akida Runtime, LD\_LIBRARY\_PATH must include the Akida Runtime library path.

**Temporary Setup**

To set `LD_LIBRARY_PATH` for the current terminal session, run the following command:

{% code overflow="wrap" %}

```bash
export LD_LIBRARY_PATH="$(python3 -c "import akida, os; print(os.path.dirname(akida.__file__))"):$LD_LIBRARY_PATH"
```

{% endcode %}

**Permanent Setup**

To make this change persistent, we find the Akida Runtime path and then add it to `~/.bashrc`. Run the following commands:

{% code overflow="wrap" %}

```bash
AKIDA_PATH=$(python3 -c 'import akida, os; print(os.path.dirname(akida.__file__))')
echo 'export LD_LIBRARY_PATH="'$AKIDA_PATH':$LD_LIBRARY_PATH"' >> ~/.bashrc
source ~/.bashrc
```

{% endcode %}

#### Troubleshooting

If no Brainchip device is detected in `degirum sys-info` output, please see the permanent setup instructions here.

If no Brainchip device is detected in `akida devices` output, you may need to (re)install the Akida PCIe driver.

### Driver Installation

Driver Installation is done through a script provided by Brainchip in their GitHub repository:

{% code overflow="wrap" %}

```bash
git clone https://github.com/Brainchip-Inc/akida_dw_edma
cd akida_dw_edma
sudo ./install.sh
```

{% endcode %}

After installation, check the device list again:

{% code overflow="wrap" %}

```bash
akida devices
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.degirum.com/pysdk/runtimes-and-drivers/akida.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
