fixstars / ion-kit

Modernized graph-based data processing framework
MIT License
7 stars 6 forks source link

Feature/support tvm in dnn #79

Closed tk1012 closed 3 years ago

tk1012 commented 3 years ago

@iitaku ion-bb-dnn において tvm runtime に対応する変更です.

https://gitlab.fixstars.com/ion/ion-kit/-/issues/18#note_459240

のフィードバックに対応したバージョンになります. フィードバックになかった変更点としては,tvm 用のデータの型情報をとるために include/ion-bb-dnn/3rdparty 下に tvm & dlpack (tvm が内部で使っている 3rdparty ヘッダ)のヘッダファイルをおいてあります. それにあわせて include/ion-bb-dnn/thirdparty_notice.txt も変更してあります.

また,もともと TVM 用の CMAKE のオプションとして WITH_TVM がありました. 使い方は,-DWITH_TVM[ON || OFF || /path/to/libtvm_runtime.so] というように,libtvm_runtime.so へのパスを指定して,必要なら -Wl,-rpath を設定していましたが,これだと結局ビルド時に libtvm_runtime.so が必要なるので削除してあります.

なので,slack でデバイス側の設定コマンドとして

$ git clone --recursive https://gitlab.fixstars.com/arachne/arachne.git
$ cd arachne
$ ./deploy/scripts/install/install_jetson.sh

を共有しましたが,追加で

$ sudo ln -s /path/to/arachne/3rdparty/tvm/build/libtvm_runtime.so /usr/lib/.

などのデフォルトのライブラリサーチパス上に libtvm_runtime.so を配置する必要があります.

追加で必要な対応がありましたら連絡お願いします.

tommyhuangtw commented 3 years ago

@tk1012 I was trying to use tvm-runtime in ion-bb-dnn by firstly running dnn_run in example, while facing error saying "failed to get any runtime creator from tvm", even though I am sure I had libtvm_runtime.so linked to /usr/lib/. Would you please help identify any possible reason? https://github.com/tk1012/ion-kit/blob/feature/support-tvm-in-dnn/include/ion-bb-dnn/rt_tvm.h#L164

image

Fixstars-iizuka commented 3 years ago

@tk1012 Thanks for your contribution! Can you make change the target branch into develop?