1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

この記事について

過去記事でRasPi 5でSSD+NPUというロマン構成を構築する時に発生した問題とその解決策、苦労話を投稿しました。本記事ではHailo-8Lのドライバーをインストールして制御ソフトウェアで正常に認識されていることを確認するところまで紹介します。

Hailo-8Lは認識されている≠Ubuntuから利用可能

当然ながらOSからHailo-8Lを動作させるためにはドライバーが必要です。ネットを検索しているとドライバーをソースからビルドして頑張ったという記事が沢山出回っています。結論から申しますと記事につられてソースビルドでインストール出来るのは相当の玄人です。そもそも最新のドライバーのソースのビルドについての情報は無く、数年前の古いバージョンの世代の情報ばかりで、現状のソースやファイル階層を反映していない記事が散見されます。失敗すればOSの再インストールからやり直しとなるため、安全策を採用することにしました。以下がその方法です。

Hailo Developer Zoneのアカウント作成

実はHailo-8LのPCIeドライバーなどはdebファイル形式で配布されています。それを入手してインストールすることが一番失敗の可能性が低く安全に実行できる方法だと思います。Hailo Developer Zoneからダウンロードしますが、まずはアカウントの作成が必要です。作成後、早速ログインします。

Downloadページに移動

左上にDownloadsというボタンが有るのでクリックし、以下の様なDownloadページに遷移することを確認します。

image.png

Hailo-8L用資材ダウンロードページに移動

今回Hailo-8Lのドライバーなどをインストールしたいので、Hailo-8L用資材のページに移動します。下の図を参考に項目を選択して下さい。ARM64環境(RasPi 5)にインストール出来る選択肢は事実上1つしかなく、HailoRT及びpyHailoRTのみです。今回はPCIeドライバーとHailoRTパッケージをインストールします。pyHailoRTは別の機会に試します。PythonはPython3.13環境を構築予定なのでPythonのバージョンは3.13を選択します。

image.png

資材のダウンロード

各資材の項目の右端に表示されているダウンロードボタンをクリックしてダウンロードします。RasPi 5上から直接実施しても別のホストマシンから実行してscpコマンドなどで転送しても可能でしょう。

image.png

PCIeドライバーのインストール

まずはドライバーをインストールします。インストール完了後に再起動を促されますのでRasPiを再起動します。

$ sudo dpkg --install hailort-pcie-driver_4.24.0_all.deb 
[sudo] password for yvectorfield: 
Selecting previously unselected package hailort-pcie-driver.
(Reading database ... 172639 files and directories currently installed.)
Preparing to unpack hailort-pcie-driver_4.24.0_all.deb ...
Could not test for SecureBoot, assuming SecureBoot is disabled on this machine.
Unpacking hailort-pcie-driver (4.24.0) ...
Setting up hailort-pcie-driver (4.24.0) ...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

build-essential/noble,now 12.10ubuntu1 arm64 [installed]
Failed to install PCIe driver to the DKMS tree. Trying to install PCIe driver without DKMS
Please reboot your computer for the installation to take effect.
sudo reboot

HailoRTパッケージのインストール

OSの再起動後にHailoRTパッケージをインストールします。

 $ sudo dpkg --install hailort_4.24.0_arm64.deb 
[sudo] password for yvectorfield: 
Selecting previously unselected package hailort.
(Reading database ... 172721 files and directories currently installed.)
Preparing to unpack hailort_4.24.0_arm64.deb ...
Unpacking hailort (4.24.0) ...
Setting up hailort (4.24.0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hailort.service → /usr/lib/systemd/system/hailort.service.
Processing triggers for libc-bin (2.39-0ubuntu8.7) ...

正常に認識しているかの確認

本当は適当なAI系サンプルが有ればそれを動作させて。。。となるのですが、適当な資材が無いため、今回は認識されているかの確認のみです。haliortcli scanコマンドを用います。正しく認識されている様です。

$ hailortcli scan
Hailo Devices:
[-] Device: 0000:03:00.0

lspciの実行結果とも一致します。

0000:03:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)

まとめ

RasPi 5にHailo-8Lを取り付け、ドライバーインストールまで完了しました。次はいよいよAI系のチュートリアルを動作させたりしてHailo-8Lの性能を調べていこうと思います。同様の構成を考えておられる方の参考になりますと幸いです。

Reference

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?