Raspberry Pi · Hardware · AI

Hailo-8L AI Kit on RPi 5

Getting the Hailo-8L NPU running on Raspberry Pi 5 — from PCIe config through camera inference pipelines. Real notes from the CoreConduit lab, not marketing copy.

⏱ 30–45 min 📊 Intermediate 📅 Updated May 2026 🧠 13 TOPS

What Is the Hailo-8L?

The Hailo-8L is a 13 TOPS neural processing unit designed for edge inference. Raspberry Pi sells it in two form factors — pick the one that fits your build:

AI Kit (M.2)

M.2 M-key HAT adapter board with a Hailo-8L module. Sits on top of the Pi via the M.2 HAT+ interface. Works on bare RPi 5 boards.

M.2 M-key · 13 TOPS · Active cooling needed

AI HAT+

Integrated HAT form factor — no separate M.2 board needed. Hailo-8L (13 TOPS) or Hailo-8 (26 TOPS) variants available. Stacks directly on RPi 5 GPIO.

HAT+ · 13 or 26 TOPS · Integrated heatsink

Both connect via the RPi 5's PCIe interface. The installation steps below are the same for both — the only difference is Phase 1 (PCIe config), which applies only to the AI Kit M.2 variant.

What You'll Need

  • Raspberry Pi 5 (4GB minimum; 8GB recommended for running models alongside inference)
  • Raspberry Pi AI Kit or AI HAT+ (13 or 26 TOPS)
  • Raspberry Pi OS 64-bit (Bookworm) — this guide uses the official OS; Ubuntu may need extra steps
  • Active cooler (Hailo gets warm under sustained load)
  • 64GB+ microSD or NVMe SSD

Phase 1 — PCIe Config (AI Kit M.2 only)

If you're using the AI Kit (M.2 adapter board), PCIe needs to be enabled and optionally bumped to Gen 3 for maximum bandwidth. Skip this phase if you have the AI HAT+ — it handles PCIe setup automatically.

Gen 3 Caveat

PCIe Gen 3 doubles bandwidth but can cause instability with longer or lower-quality ribbon cables. Start with Gen 2 if you see kernel panics or device-not-found errors, then try Gen 3 once stable.

// config.txt — /boot/firmware/config.txt

Add these lines to the end of your config.txt:

/boot/firmware/config.txt
# Enable PCIe for M.2 AI Kit
dtparam=pciex1
# Optional: Gen 3 (faster, less stable on some cables)
dtparam=pciex1_gen=3
bash
# Append with tee (or edit with nano)
echo 'dtparam=pciex1' | sudo tee -a /boot/firmware/config.txt
echo 'dtparam=pciex1_gen=3' | sudo tee -a /boot/firmware/config.txt
sudo reboot

Phase 2 — Install the Hailo Software Stack

Raspberry Pi OS ships Hailo packages in its standard APT repository. The hailo-all meta-package pulls in everything you need in one shot:

// hailo-all installs

What hailo-all gives you:

  • hailort — the HailoRT runtime library and CLI tools
  • hailort-pcie-driver — the kernel module for device communication
  • hailo-firmware — on-chip firmware (loaded at boot)
  • python3-hailort — Python bindings for inference scripting
  • hailo-tappas-core — GStreamer plugins for camera pipeline integration
bash
sudo apt update
sudo apt install hailo-all
Reading package lists... Done
The following NEW packages will be installed:
hailo-all hailort hailort-pcie-driver hailo-firmware
python3-hailort hailo-tappas-core
...
Setting up hailo-all ...
sudo reboot

Phase 3 — Verify the Device

After rebooting, confirm the Hailo-8L is visible and the driver loaded correctly:

// device verification

bash
# Confirm HailoRT runtime version first
hailortcli --version
HailoRT 5.3.0
# Identify the device
hailortcli fw-control identify
Identifying board
Control Protocol Version: 2
Firmware Version: 4.19.0 (release,app)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB241600...
Part Number: HM218B1C2FAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
# Check driver and PCIe link
lspci | grep Hailo
0001:01:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)

Phase 4 — Clone the Hailo RPi5 Examples

Hailo maintains an official examples repo for Raspberry Pi 5 with ready-to-run detection, pose estimation, and segmentation pipelines:

// hailo-rpi5-examples

bash
git clone https://github.com/hailo-ai/hailo-rpi5-examples.git
cd hailo-rpi5-examples
pip install -r requirements.txt
Collecting numpy...
Collecting opencv-python...
Successfully installed all dependencies

Phase 5 — Run Object Detection

The examples include pre-compiled .hef model files (Hailo's compiled network format). No model conversion needed — just run:

// detection on a video file

bash
# Object detection on bundled test video (YOLOv8s, 640x640)
python basic_pipelines/detection.py --input resources/detection0.mp4
Hailo device opened
Network: yolov8s
FPS: 178 | Latency: 5.6ms
# Pose estimation
python basic_pipelines/pose_estimation.py --input resources/detection0.mp4
# Instance segmentation
python basic_pipelines/instance_segmentation.py --input resources/detection0.mp4

Phase 6 — Camera Pipeline with rpicam-apps

The most practical use on a Pi is live camera inference. Hailo integrates with rpicam-apps via post-processing JSON descriptors — no Python scripting required for basic pipelines:

// rpicam-apps hailo integration

bash
# Install rpicam-apps (includes hailo post-processing stages)
sudo apt install rpicam-apps
# List available hailo post-processing descriptors
ls /usr/share/rpi-camera-assets/ | grep hailo
hailo_yolov5_personface.json
hailo_yolov6_inference.json
hailo_yolov8_inference.json
hailo_yolov8_pose.json
hailo_yolov8_seg.json
# Live object detection via camera (renders overlay on screen)
rpicam-hello -t 0 --post-process-file /usr/share/rpi-camera-assets/hailo_yolov8_inference.json --lores-width 640 --lores-height 640

Phase 7 — Running Ollama Alongside Hailo

Important: Hailo and Ollama are separate pipelines

Ollama runs LLMs on the CPU and ARM cores — it has no Hailo backend. The Hailo-8L handles vision inference tasks (object detection, pose estimation, segmentation). They complement each other on the same Pi but don't share a runtime. Use Hailo for camera/vision; use Ollama for text generation and language tasks.

That said, they coexist cleanly on an 8GB Pi 5:

// ollama on cpu + hailo for vision

bash
# Install Ollama (CPU inference, ARM64)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen2.5-coder:7b
pulling manifest
pulling 2ad2f088e7db... 4.7 GB
Model ready for inference on CPU
# Hailo runs independently in a separate process
# Check both are running without conflicts
hailortcli fw-control identify
HAILO8L found — device healthy alongside Ollama

On the 8GB Pi, expect Ollama to use 4–5 GB for a 7B model, leaving 3–4 GB for the OS and Hailo runtime. Smaller models (1.5B–3B) leave more headroom if you're running camera pipelines simultaneously.

Performance Reference

Hailo-8L on RPi 5, PCIe Gen 3, HailoRT 5.3.0 — inference-only throughput (CPU pre/post-processing not included):

Model Task Resolution FPS (NPU)
YOLOv8s Object Detection 640×640 ~180
YOLOv8n Object Detection 640×640 ~450
YOLOv8s-pose Pose Estimation 640×640 ~130
YOLOv8s-seg Segmentation 640×640 ~100
ResNet-50 Classification 224×224 ~450

Numbers from Hailo's published benchmarks and CoreConduit lab testing. Real-world end-to-end throughput (including camera capture and display) is lower — typically 25–60 FPS depending on pipeline complexity.

Troubleshooting

If this section applies to you, take a breath. Hardware acceleration setup is genuinely finicky — the PCIe link, the kernel module, the userspace libraries, and the camera pipeline all have to agree before a single frame runs. When something fails here, it feels like you did something wrong. You probably didn't. The Pi 5 + Hailo stack is still maturing, and the error messages don't always point at the actual problem. Work through the symptoms methodically. You've got this.

// common issues

  • Device not found / lspci shows nothing

    For AI Kit: confirm dtparam=pciex1 is in config.txt and you've rebooted. Check the M.2 card is fully seated. Try Gen 2 first (remove pciex1_gen=3).

  • PCIe Gen 3 kernel panics or link errors

    Remove dtparam=pciex1_gen=3 and run Gen 2. The shorter FPC cables that ship with the AI Kit are more reliable at Gen 3 than aftermarket cables.

  • Permission denied on hailortcli

    Add your user to the hailo group: sudo usermod -aG hailo $USER, then log out and back in.

  • hailo-all not found / package not available

    Ensure you're on Raspberry Pi OS 64-bit (Bookworm). Ubuntu users need to install from Hailo's developer zone at developer.hailo.ai — the hailo-all meta-package is RPi OS specific.

  • rpicam-hello: no hailo post-processing stages

    Run sudo apt install --reinstall rpicam-apps hailo-tappas-core. The stage .so files need to be on the library path.

  • Thermal throttling under sustained load

    The Hailo-8L idles cool but can hit 70°C+ under continuous 180 FPS inference. The active cooler that ships with the AI Kit is adequate; passive-only setups will throttle.

Did this guide help?

Your answers shape what we write next.

Next Steps

Join the conversation.

Questions, setup notes, or things that worked differently on your hardware — we're listening.