diff options
author | David Svantesson <david.svantesson@arm.com> | 2023-06-08 10:05:59 +0000 |
---|---|---|
committer | David Svantesson <david.svantesson@arm.com> | 2023-06-22 14:35:20 +0000 |
commit | 90d15b985dbefd730941cbc79997baa0089dc4f3 (patch) | |
tree | 0c06e95c2e626c751d6222118dd5fcd630d2e65f /scripts/print_version_file.py | |
parent | da9cb7087ced66323d840332878e9ef9c833e862 (diff) | |
download | ComputeLibrary-90d15b985dbefd730941cbc79997baa0089dc4f3.tar.gz |
Bazel and CMake optional fp16 support
Resolves ONCPUML-1274
Signed-off-by: David Svantesson <david.svantesson@arm.com>
Change-Id: I1d189596cfce5be87a18c8065d683700b3c9960f
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9745
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'scripts/print_version_file.py')
-rw-r--r-- | scripts/print_version_file.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/scripts/print_version_file.py b/scripts/print_version_file.py index 6c50216f8b..a7654ff997 100644 --- a/scripts/print_version_file.py +++ b/scripts/print_version_file.py @@ -31,6 +31,25 @@ def make_version_file(build_args, git_hash): VERSION, build_args, git_hash.strip()) return build_info +def make_version_file_from_sconscript(build_args, git_hash): + VERSION = "v0.0-unreleased" + fp = None + if os.path.exists("external/compute_library/SConscript"): + fp = "external/compute_library/SConscript" + elif os.path.exists("SConscript"): + fp = "SConscript" + if fp: + with open(fp) as scons_file: + for line in scons_file: + if "VERSION = " in line: + VERSION = line.split("=")[-1].strip().replace("\"", "") + break + return "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % ( + VERSION, build_args, git_hash.strip()) -if __name__ == "__main__": - print(make_version_file(sys.argv[1], sys.argv[2])) +if __name__ == "__main__": + if len(sys.argv) == 4 and sys.argv[3].lower() == "true": + print(make_version_file_from_sconscript(sys.argv[1], sys.argv[2])) + else: + print(make_version_file(sys.argv[1], sys.argv[2])) + |