F3 model init failed
Describe the bug When lauching flowpilot, model init failed with errors:
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
To Reproduce launch flowpilot
Expected behavior No errors
Platform Details Desktop:
- Ubuntu 22.04
- using gpu
Additional context F2 model is working well
Seems like Mail GPU with OpenCL bug, https://discuss.tvm.apache.org/t/opencl-mali-error-use-of-undeclared-identifier-inff/2270
Okay, fixed with recently TNN version.
Great you fixed it! Shall we update libTNN to newer versions?
It's better to update, some phones use Mali GPU
BTW, i was using tnn-v0.3.0-full-source from Release before, and now using the latest master branch.