Skip to content

Commit dfd57e0

Browse files
committed
Arm backend: Add requirements.txt for arm backend
Add requirements.txt files to handle pip installs in a more python way of doing things. Tagged versions handled in one place instead of being spread out in shell scripts. Requirements-arm-tosa.txt contains what is needed for the tosa reference model which is shared between multiple backends. Requirements-arm-ethos-u.txt contains the vela compiler needed by the ethos-u backend. Requirements-arm-models-test.txt contains test models needed for baremetal tests. The install_models_for_test.sh was keept since that its used by gitlab ci. Change-Id: I3213e543d15c23b96ccd1f683a9d6c7b164d7e7b Signed-off-by: [email protected]
1 parent 473df33 commit dfd57e0

File tree

6 files changed

+27
-47
lines changed

6 files changed

+27
-47
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
ethos-u-vela @ git+https://gitlab.arm.com/artificial-intelligence/ethos-u/ethos-u-vela@d37febc1715edf0d236c2ff555739a8a9aadcf9a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
diffusers[torch] == 0.33.1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
ml_dtypes == 0.5.1
7+
flatbuffers == 24.3.25
8+
9+
tosa-tools @ git+https://git.gitlab.arm.com/tosa/[email protected]

backends/arm/scripts/install_models_for_test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
# LICENSE file in the root directory of this source tree.
66

77
set -e
8-
9-
# Install diffusers for Stable Diffusion model test
10-
pip install "diffusers[torch]==0.33.1"
8+
pip install -r backends/arm/requirements-arm-models-test.txt

backends/arm/scripts/install_reference_model.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/arm/setup.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ else
5858
echo "[main] Error: only x86-64 & aarch64/arm64 architecture is supported for now!"; exit 1;
5959
fi
6060

61-
# Vela
62-
vela_repo_url="https://gitlab.arm.com/artificial-intelligence/ethos-u/ethos-u-vela"
63-
vela_rev="d37febc1715edf0d236c2ff555739a8a9aadcf9a"
64-
6561
# MLSDK dependencies
6662
mlsdk_manifest_dir="ml-sdk-for-vulkan-manifest"
6763

@@ -329,8 +325,8 @@ function setup_toolchain() {
329325
tar xf "${toolchain_dir}.tar.xz"
330326
}
331327

332-
function setup_vela() {
333-
pip install ethos-u-vela@git+${vela_repo_url}@${vela_rev}
328+
function setup_ethos_u_tools() {
329+
CMAKE_POLICY_VERSION_MINIMUM=3.5 BUILD_PYBIND=1 pip install --no-dependencies -r $et_dir/backends/arm/requirements-arm-ethos-u.txt
334330
}
335331

336332
function prepend_env_in_setup_path() {
@@ -465,12 +461,11 @@ if [[ $is_script_sourced -eq 0 ]]; then
465461
create_setup_path
466462
fi
467463

468-
# Setup the tosa_reference_model
469-
$et_dir/backends/arm/scripts/install_reference_model.sh ${root_dir}
464+
# Setup the tosa_reference_model and dependencies
465+
CMAKE_POLICY_VERSION_MINIMUM=3.5 BUILD_PYBIND=1 pip install --no-dependencies -r $et_dir/backends/arm/requirements-arm-tosa.txt
470466

471-
# Setup vela and patch in codegen fixes
472467
if [[ "${enable_vela}" -eq 1 ]]; then
473-
setup_vela
468+
setup_ethos_u_tools
474469
fi
475470

476471
echo "[main] Update path by running 'source ${setup_path_script}.sh'"

0 commit comments

Comments
 (0)