在rk3588上运行时报Compiler frontend failed
0312birdzhang opened this issue · comments
运行的模型是flowpilot的supercombo.tnnmodel https://github.com/flowdriveai/flowpilot/tree/premium/selfdrive/assets/models/f3
最后一行调用的 tnn_api.cc
系统:ubuntu 22.04
架构:rk3588
错误日志如下:
E/tnn: BuildProgram [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/opencl_runtime.cc][Line 478] Program build log: <source>:78:18: error: use of undeclared identifier 'inff'
FLOAT4 out = OPERATOR;
^
<built-in>:8:59: note: expanded from here
#define OPERATOR clamp(in,(FLOAT4)(1.00000e-12f),(FLOAT4)(inff))
^
error: Compiler frontend failed (error code 63)
E/tnn: BuildProgram [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/opencl_runtime.cc][Line 480] Build program failed !
E/tnn: BuildKernel [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/opencl_runtime.cc][Line 333] unary build failed!
E/tnn: CreateExecuteUnit [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/opencl_utils.cc][Line 522] kernel (Unary) build failed!
E/tnn: Init [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/acc/opencl_unary_layer_acc.cc][Line 34] create execute unit failed!
E/tnn: Init [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/device/opencl/acc/opencl_clip_layer_acc.cc][Line 26] code: 0xA006 msg: build program falied
E/tnn: InitLayers [File /home/orangepi/others/tnn-v0.3.0-full-source/source/tnn/core/default_network.cc][Line 319] Error Init layer Clip_296 (err: 40966 or 0xA006)
E/tnn: check_status [File /home/orangepi/flowpilot/selfdrive/modeld/tnn/src/tnn_api.cc][Line 24] model init failed 40966
可能是mail GPU和opencl的bug
https://discuss.tvm.apache.org/t/opencl-mali-error-use-of-undeclared-identifier-inff/2270
使用最近版本的TNN重新编译后解决