diff options
author | Adnan AlSinan <adnan.alsinan@arm.com> | 2021-08-06 12:44:51 +0100 |
---|---|---|
committer | SiCongLi <sicong.li@arm.com> | 2021-08-13 10:07:55 +0100 |
commit | f2dde586bd785af5b8f3924b513fdb62f639ed0f (patch) | |
tree | 21c98635e126c32d07dad035864242f16e435d6f | |
parent | 66cb91baacf4dadf1b467bc287e7e9bf17313aa1 (diff) | |
download | ComputeLibrary-f2dde586bd785af5b8f3924b513fdb62f639ed0f.tar.gz |
Fixing the Issue when building for Android using compress_kernels=1 and python 3
Resolves COMPMID-4759
Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com>
Change-Id: Iaa37c63682bbf900e42195f52f5264ea565cc46e
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6059
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
-rw-r--r-- | SConscript | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SConscript b/SConscript index 2f43e39e90..2eed75a1a5 100644 --- a/SConscript +++ b/SConscript @@ -25,6 +25,7 @@ import re import subprocess import zlib import json +import codecs VERSION = "v0.0-unreleased" LIBRARY_VERSION_MAJOR = 24 @@ -136,7 +137,8 @@ def resolve_includes(target, source, env): with open(file[1].target_name.get_path(), 'w+') as out_file: file_to_write = "\n".join( file[1].file_contents ) if env['compress_kernels']: - file_to_write = zlib.compress(file_to_write, 9).encode("base64").replace("\n", "") + file_to_write = zlib.compress(file_to_write.encode('utf-8'), 9) + file_to_write = codecs.encode(file_to_write, "base64").decode('utf-8').replace("\n", "") file_to_write = "R\"(" + file_to_write + ")\"" out_file.write(file_to_write) |