C++ use of external delegate for NPU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

C++ use of external delegate for NPU

948件の閲覧回数
AB22
Contributor III

I am trying to run a tflite model on the NPU of an i.MX8M Plus. I need to write a Qt/C++ application to run the model on images from a camera.

I have built the SDK with the following:

IMAGE_INSTALL:append = " tensorflow-lite tensorflow-lite-vx-delegate opencv python3-pillow adwaita-icon-theme abseil-cpp"

I am having dependency issues in which header files exist but the binary is not linked even though the following libraries are linked:

 libtensorflow-lite, libvx_delegate, libtim-vx, libovx, libopenvx

I believe that I need to recompile the tim-vx recipe to include the tflite-vx-delegate. This is described on the following pages:

https://github.com/VeriSilicon/TIM-VX

https://github.com/VeriSilicon/tflite-vx-delegate#readme

I do not understand the directions. For instance, for the cmake option

-DEXTERNAL_VIV_SDK=<low-level-driver/out/sdk>. What is meant by <low-level-driver/out/sdk>?

Also, for the cmake variable

-DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=/my/copy/of/tensorflow

To what precisely is /my/copy/of/tensorflow intended to point?

Thank you

 

 

 

0 件の賞賛
返信
2 返答(返信)

900件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Why aren't you using the headers we provide in the full image?
Maybe this can help:

https://community.nxp.com/t5/i-MX-Processors/Vx-delegate-invoking-in-Python-but-not-C-for-IMXMPLUS/m...

Regards

0 件の賞賛
返信

897件の閲覧回数
AB22
Contributor III

Hi @Bio_TICFSL 

  I have the headers but there are items which seem to be missing from the libraries. Specifically, I am having the same issue as the person in the thread you linked which is an error on this line:

resolver.AddCustom(kNbgCustomOp, tflite::ops::custom::Register_VSI_NPU_PRECOMPILED());

  I have commented out that line and I am progressing with the code now.