我正在尝试为C++ image classification demo启用XNNPACK委托来编译TensorFlow lite代码。
我看到它是可能建立与巴泽尔。但是,我想知道如何用cmake构建它。
如果我禁用XNNPACK,它就可以工作。
cmake -DTFLITE_ENABLE_XNNPACK=OFF ../tensorflow/lite
cmake --build . -j -t label_image
字符串
但是如果我启用XNNPACK,它会给我未定义的引用错误。
cmake -DTFLITE_ENABLE_XNNPACK=ON ../tensorflow/lite
cmake --build . -j -t label_image
型
错误消息如下所示。
[ 95%] Building CXX object examples/label_image/CMakeFiles/label_image.dir/__/__/tools/tool_params.cc.o
[100%] Linking CXX executable label_image
CMakeFiles/label_image.dir/__/__/tools/evaluation/utils.cc.o: In function `tflite::evaluation::CreateXNNPACKDelegate(TfLiteXNNPackDelegateOptions const*)':
utils.cc:(.text+0x9ce): undefined reference to `TfLiteXnnpackDelegatePluginCApi'
collect2: error: ld returned 1 exit status
examples/label_image/CMakeFiles/label_image.dir/build.make:370: recipe for target 'examples/label_image/label_image' failed
make[3]: *** [examples/label_image/label_image] Error 1
CMakeFiles/Makefile2:6488: recipe for target 'examples/label_image/CMakeFiles/label_image.dir/all' failed
make[2]: *** [examples/label_image/CMakeFiles/label_image.dir/all] Error 2
CMakeFiles/Makefile2:6495: recipe for target 'examples/label_image/CMakeFiles/label_image.dir/rule' failed
make[1]: *** [examples/label_image/CMakeFiles/label_image.dir/rule] Error 2
Makefile:2262: recipe for target 'label_image' failed
make: *** [label_image] Error 2
型
有人知道如何在TensorFlow Lite图像分类中使用cmake启用XNNPACK吗?
谢谢你的好意
1条答案
按热度按时间2ul0zpep1#
字符串