diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-01-22 05:47:37 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-02-01 16:51:44 +0000 |
commit | ea857273d8b4a94fb7f1e63ce9068a60259fb9d3 (patch) | |
tree | e4d7a90f28d4ba4d218e77343c107afa137d7cec /docs/00_introduction.dox | |
parent | 655e8c6334580a570008243af1896d269fdd60ad (diff) | |
download | ComputeLibrary-ea857273d8b4a94fb7f1e63ce9068a60259fb9d3.tar.gz |
Compress OpenCL kernel files using zlib for Android
Kernel files are embedded into the binary as the default option when
building which leads to binary size bloating.
Add `compress_kernels` option and utilize zlib for further compressing
the text kernel files and reduce the overall binary size. We use a
base64 encoding/decoding to ensure that the strings can be easily
embedded. This adds to the binary size but still the overall reduction
is significant.
Maximum compression level 9 is used.
Option is currently restricted to Android builds as android toolchain
provides a zlib library.
Initial experimentations indicate a binary size reduction of 50%
Resolves: COMPMID-4017
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Iee81b8c00391b26a5f41642699692928a4d6bd6e
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4958
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'docs/00_introduction.dox')
-rw-r--r-- | docs/00_introduction.dox | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox index ccc44d48e0..6a4d03b527 100644 --- a/docs/00_introduction.dox +++ b/docs/00_introduction.dox @@ -1388,6 +1388,10 @@ To see the build options available simply run ```scons -h```: default: True actual: True + compress_kernels: Compress embedded OpenCL kernels in library binary. Note embed_kernels should be enabled as well (yes|no) + default: False + actual: False + set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no) default: False actual: False @@ -1508,6 +1512,8 @@ To see the build options available simply run ```scons -h```: There is also an 'embed_only' option which will generate all the .embed files for the OpenCL kernels and / or OpenGLES compute shaders. This might be useful if using a different build system to compile the library. +In addittion the option 'compress_kernels' will compress the embedded OpenCL kernel files using zlib and inject them in the library. This is useful for reducing the binary size. Note, this option is only available for Android when 'embed_kernels' is enabled. + @b Werror: If you are compiling using the same toolchains as the ones used in this guide then there shouldn't be any warning and therefore you should be able to keep Werror=1. If with a different compiler version the library fails to build because of warnings interpreted as errors then, if you are sure the warnings are not important, you might want to try to build with Werror=0 (But please do report the issue either on Github or by an email to developer@arm.com so that the issue can be addressed). @b opencl / @b neon / @b gles_compute: Choose which SIMD technology you want to target. (NEON for ARM Cortex-A CPUs or OpenCL / GLES_COMPUTE for ARM Mali GPUs) |