VeriSilicon/tflite-vx-delegate

Cannot find the header file cl_viv_vx_ext.h.

teddyxiong53 opened this issue · 2 comments

在x86_64的机器上编译运行,运行命令:

./_deps/tensorflow-build/tools/benchmark/benchmark_model --external_delegate_path=./libvx_delegate.so --graph=../../inception5h/mobilenet_v1_0.25_128_quant.tflite

mobilenet_v1_0.25_128_quant.tflite 是从这里下载的:
https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_0.25_128_quant.tgz

打印日志内容:

STARTING!
Log parameter values verbosely: [0]
Graph: [../../inception5h/mobilenet_v1_0.25_128_quant.tflite]
External delegate path: [./libvx_delegate.so]
Loaded model ../../inception5h/mobilenet_v1_0.25_128_quant.tflite
Vx delegate: allowed_builtin_code set to 0.
Vx delegate: error_during_init set to 0.
Vx delegate: error_during_prepare set to 0.
Vx delegate: error_during_invoke set to 0.
EXTERNAL delegate created.
Going to apply 1 delegates one after another.
Initialize supported_builtins
vx_delegate Delegate::Init
Initialize supported_builtins
Delegate::Prepare node:0x16d95a0
Explicitly applied EXTERNAL delegate, and the model graph will be completely executed by the delegate.
The input model file size (MB): 0.497264
Initialized session in 46.886ms.
Running benchmark for at least 1 iterations and at least 0.5 seconds but terminate if exceeding 150 seconds.
Delegate::Invoke node:0x16d95a0
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating DepthwiseConv2d op
Creating Conv2d op
Creating Pool2d(3) op
Creating Conv2d op
Creating Reshape op
Creating softmax op
Verifying graph
W [HandleLayoutInfer:257]Op 18: default layout inference pass.
(134:0) : error : Error(0,134) : Cannot find the header file cl_viv_vx_ext.h.
(140:0) : error : syntax error at 'VXC_512Bits'

ERROR: Failed to compile vx shader. (error: FFFFFFFF)
Failed to verify graph
Aborted

当你看到 Cannot find the header file cl_viv_vx_ext.h. 这个错误时,表示你没有设置对VIVANTE_SDK_DIR这个环境变量,这个环境变量要指向我们驱动的sdk root目录,比如TIM-vx 里面的prebuilt x86目录

当你看到 Cannot find the header file cl_viv_vx_ext.h. 这个错误时,表示你没有设置对VIVANTE_SDK_DIR这个环境变量,这个环境变量要指向我们驱动的sdk root目录,比如TIM-vx 里面的prebuilt x86目录

感谢回复,设置这个环境变量后正常了。