summaryrefslogtreecommitdiff
path: root/set_up_default_resources.py
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2022-05-20 14:30:02 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2022-05-23 16:11:45 +0100
commit9c6f9f8afcb003fd72944918d6b6e200d68c0918 (patch)
treeb1237909970ac74232f4ed81a26edc0847204269 /set_up_default_resources.py
parent6f6df0934f991b64fef494b86643b3f5074fca0e (diff)
downloadml-embedded-evaluation-kit-9c6f9f8afcb003fd72944918d6b6e200d68c0918.tar.gz
MLECO-3225: Using official support for Arm Cortex-M85 CPU.
* CMake version requirement bumped up to 3.21.0 * CMake 3.22.4 installed in the local Python virtualenv * CPU flags updated in toolchain files. * Using __ARM_FEATURE_DSP instead of potentially defining ARM_MATH_DSP wrongly. * CMake project version bumped up to 22.05.0 Changes also made for MLECO-3107 (pack generation): * TensorFlow Lite Micro CMSIS-pack version updated to 1.22.02. * Change to using __ARM_FEATURE_DSP will also help the generated pack. Partial changes for MLECO-3095: * CMSIS updated to version post 5.9.0 * TensorFlow Lite Micro updated to latest available * Ethos-U driver and core-platform repositories updated to 20.05_rc2 tags. Change-Id: I012c9e65897aed8ce589cff9bfe3a19efc3edeb9 Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'set_up_default_resources.py')
-rwxr-xr-xset_up_default_resources.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/set_up_default_resources.py b/set_up_default_resources.py
index 0b885c0..c9f83c9 100755
--- a/set_up_default_resources.py
+++ b/set_up_default_resources.py
@@ -349,8 +349,7 @@ def set_up_resources(
additional_npu_config_names: tuple = (),
arena_cache_size: int = 0,
check_clean_folder: bool = False,
- additional_requirements_file: str = "",
-):
+ additional_requirements_file: str = "") -> (Path, Path):
"""
Helpers function that retrieve the output from a command.
@@ -367,6 +366,14 @@ def set_up_resources(
additional_requirements_file (str): Path to a requirements.txt file if
additional packages need to be
installed.
+
+ Returns
+ -------
+
+ Tuple of pair of Paths: (download_directory_path, virtual_env_path)
+
+ download_directory_path: Root of the directory where the resources have been downloaded to.
+ virtual_env_path: Path to the root of virtual environment.
"""
# Paths.
current_file_dir = Path(__file__).parent.resolve()
@@ -420,13 +427,15 @@ def set_up_resources(
raise
# 1.2 Does the virtual environment exist?
- env_python = str(download_dir / "env" / "bin" / "python3")
- env_activate = str(download_dir / "env" / "bin" / "activate")
+ env_dirname = "env"
+ env_path = download_dir / env_dirname
+ env_python = str(env_path / "bin" / "python3")
+ env_activate = str(env_path / "bin" / "activate")
- if not (download_dir / "env").is_dir():
+ if not env_path.is_dir():
os.chdir(download_dir)
# Create the virtual environment.
- command = "python3 -m venv env"
+ command = f"python3 -m venv {env_dirname}"
call_command(command)
commands = ["pip install --upgrade pip", "pip install --upgrade setuptools"]
for c in commands:
@@ -603,6 +612,8 @@ def set_up_resources(
with open(metadata_file_path, "w") as metadata_file:
json.dump(metadata_dict, metadata_file, indent=4)
+ return download_dir, env_path
+
if __name__ == "__main__":
parser = ArgumentParser()