Skip to content

Commit a3a8691

Browse files
authored
Arm backend: Add requirements.txt for arm backend (#13804)
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. Signed-off-by: [email protected]
1 parent a324a93 commit a3a8691

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
@@ -70,10 +70,6 @@ else
7070
echo "[main] Error: only x86-64 & aarch64/arm64 architecture is supported for now!"; exit 1;
7171
fi
7272

73-
# Vela
74-
vela_repo_url="https://gitlab.arm.com/artificial-intelligence/ethos-u/ethos-u-vela"
75-
vela_rev="d37febc1715edf0d236c2ff555739a8a9aadcf9a"
76-
7773
# MLSDK dependencies
7874
mlsdk_manifest_dir="ml-sdk-for-vulkan-manifest"
7975
vulkan_sdk_bin_dir="${vulkan_sdk_base_dir}/${vulkan_sdk_version}/${ARCH}/bin"
@@ -377,8 +373,8 @@ function setup_toolchain() {
377373
tar xf "${toolchain_dir}.tar.xz"
378374
}
379375

380-
function setup_vela() {
381-
pip install ethos-u-vela@git+${vela_repo_url}@${vela_rev}
376+
function setup_ethos_u_tools() {
377+
CMAKE_POLICY_VERSION_MINIMUM=3.5 BUILD_PYBIND=1 pip install --no-dependencies -r $et_dir/backends/arm/requirements-arm-ethos-u.txt
382378
}
383379

384380
function prepend_env_in_setup_path() {
@@ -526,12 +522,11 @@ if [[ $is_script_sourced -eq 0 ]]; then
526522
create_setup_path
527523
fi
528524

529-
# Setup the tosa_reference_model
530-
$et_dir/backends/arm/scripts/install_reference_model.sh ${root_dir}
525+
# Setup the tosa_reference_model and dependencies
526+
CMAKE_POLICY_VERSION_MINIMUM=3.5 BUILD_PYBIND=1 pip install --no-dependencies -r $et_dir/backends/arm/requirements-arm-tosa.txt
531527

532-
# Setup vela and patch in codegen fixes
533528
if [[ "${enable_vela}" -eq 1 ]]; then
534-
setup_vela
529+
setup_ethos_u_tools
535530
fi
536531

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

0 commit comments

Comments
 (0)