Closed RichardPar closed 1 year ago
There are 2 unpacked files below
wksp/tflite-vx-delegate/build/_deps/tim-vx-build
aarch64_A311D_6.4.8.tgz
gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
run tar -xf [filename] in their current directories to extract and then start building - before getting excited, there is another error in the linking stage
[ 96%] Building CXX object CMakeFiles/vx_delegate.dir/utils.cc.o
[ 96%] Building CXX object CMakeFiles/vx_delegate.dir/vx_delegate_adaptor.cc.o
[100%] Linking CXX shared library libvx_delegate.so
/usr/bin/ld: _deps/tim-vx-build/src/tim/libtim-vx.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/vx_delegate.dir/build.make:251: libvx_delegate.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:1313: CMakeFiles/vx_delegate.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1320: CMakeFiles/vx_delegate.dir/rule] Error 2
make: *** [Makefile:169: vx_delegate] Error 2
Looks like its using the hosts LD and not the cross compilers - well all of tflite is being built for the wrong platform... its not cross compiling anything!
Finally got it compiled - don't know if it works yet..
you need to use the external toolchain cmake - Whoever done the build system was having a bad day and only done half the job
Got it working eventually.. The Galcore.ko bundled on Khadas Fenix Debian is version 6.4.8.7.1.1.1 - which DOES NOT WORK!
I used the older version and it passes tests. Galcore version 6.4.6.2 (which is in this Git repository)
khadas@Khadas:~/MasterTest$ python3 test.py
Vx delegate: allowed_cache_mode set to 0.
Vx delegate: device num set to 0.
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.
<tflite_runtime.interpreter.Delegate object at 0x7fb243ffd0>
========== INPUT DETAILS ========
[{'name': 'serving_default_input_1:0', 'index': 0, 'shape': array([ 1, 256, 256, 3], dtype=int32), 'shape_signature': array([ 1, 256, 256, 3], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.003921568859368563, 0), 'quantization_parameters': {'scales': array([0.00392157], dtype=float32), 'zero_points': array([0], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
====== OUTPUT DETAILS ==========
[{'name': 'StatefulPartitionedCall:0', 'index': 408, 'shape': array([ 1, 4032, 6], dtype=int32), 'shape_signature': array([ 1, 4032, 6], dtype=int32), 'dtype': <class 'numpy.uint8'>, 'quantization': (0.003994452301412821, 0), 'quantization_parameters': {'scales': array([0.00399445], dtype=float32), 'zero_points': array([0], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}]
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
W [HandleLayoutInfer:281]Op 162: default layout inference pass.
[[[ 8 8 18 18 0 249]
[ 8 9 18 22 0 249]
[ 7 9 18 22 0 249]
...
[227 229 48 44 0 249]
[224 221 54 58 0 249]
[224 224 129 112 0 249]]]
Hi there,
I am trying to compile the TFlite delegate and get stuck on missing includes.. I can see the files there - but the makefiles dont seem to reflect the includes..
The file is present
What am I missing? ..
Richard