Skip to content

Commit 2411c99

Browse files
authored
Remove cadence submodule from top-level dependencies (#7839)
Summary: Every time we clone/set up ExecuTorch, we're downloading cadence dependencies. Let's make this an on-demand step. Otherwise, this is downloading almost 1GB of code.
1 parent f2720fa commit 2411c99

File tree

7 files changed

+53
-8
lines changed

7 files changed

+53
-8
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,12 @@
5555
[submodule "third-party/ios-cmake"]
5656
path = third-party/ios-cmake
5757
url = https://github.com/leetal/ios-cmake
58-
[submodule "backends/cadence/hifi/third-party/nnlib/nnlib-hifi4"]
59-
path = backends/cadence/hifi/third-party/nnlib/nnlib-hifi4
60-
url = https://github.com/foss-xtensa/nnlib-hifi4.git
6158
[submodule "third-party/prelude"]
6259
path = third-party/prelude
6360
url = https://github.com/facebook/buck2-prelude.git
6461
[submodule "third-party/pybind11"]
6562
path = third-party/pybind11
6663
url = https://github.com/pybind/pybind11.git
67-
[submodule "backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3"]
68-
path = backends/cadence/fusion_g3/third-party/nnlib/nnlib-FusionG3
69-
url = https://github.com/foss-xtensa/nnlib-FusionG3.git
7064
[submodule "third-party/ao"]
7165
path = third-party/ao
7266
url = https://github.com/pytorch/ao.git

backends/cadence/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hifi/third-party/nnlib/nnlib-hifi4
2+
fusion_g3/third-party/nnlib/nnlib-FusionG3

backends/cadence/build_cadence_fusionG3.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ unset XTENSA_CORE
1212
export XTENSA_CORE=FCV_FG3GP
1313
git submodule sync
1414
git submodule update --init
15+
./backends/cadence/install_requirements.sh
1516
./install_executorch.sh
1617

1718
rm -rf cmake-out

backends/cadence/build_cadence_hifi4.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ unset XTENSA_CORE
1212
export XTENSA_CORE=nxp_rt600_RI23_11_newlib
1313
git submodule sync
1414
git submodule update --init
15+
./backends/cadence/install_requirements.sh
1516
./install_executorch.sh
1617

1718
rm -rf cmake-out
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT_DIR_PATH="$(
4+
cd -- "$(dirname "$0")" >/dev/null 2>&1
5+
pwd -P
6+
)"
7+
8+
red=`tput setaf 1`
9+
green=`tput setaf 2`
10+
11+
EXECUTORCH_ROOT_PATH=$(realpath "$SCRIPT_DIR_PATH/../../")
12+
CADENCE_DIR_PATH="$EXECUTORCH_ROOT_PATH/backends/cadence"
13+
HIFI_DIR_PATH="$CADENCE_DIR_PATH/hifi/third-party/nnlib/nnlib-hifi4"
14+
FUSION_DIR_PATH="$CADENCE_DIR_PATH/fusion_g3/third-party/nnlib/nnlib-FusionG3"
15+
16+
cd "$EXECUTORCH_ROOT_PATH"
17+
18+
## HiFi
19+
20+
rm -rf "$HIFI_DIR_PATH"
21+
mkdir -p "$HIFI_DIR_PATH"
22+
23+
echo "${green}ExecuTorch: Cloning hifi nnlib"
24+
git clone "https://github.com/foss-xtensa/nnlib-hifi4.git" $HIFI_DIR_PATH
25+
cd $HIFI_DIR_PATH
26+
STATUS=$?
27+
if [ $STATUS -ne 0 ]; then
28+
echo "${red}ExecuTorch: Failed to clone hifi nnlib."
29+
exit 1
30+
fi
31+
32+
git checkout 102944a6f76a0de4d81adc431f3f132f517aa87f
33+
34+
35+
## Fusion G3
36+
37+
rm -rf "$FUSION_DIR_PATH"
38+
mkdir -p "$FUSION_DIR_PATH"
39+
40+
echo "${green}ExecuTorch: Cloning fusion g3"
41+
git clone "https://github.com/foss-xtensa/nnlib-FusionG3.git" $FUSION_DIR_PATH
42+
cd $FUSION_DIR_PATH
43+
STATUS=$?
44+
if [ $STATUS -ne 0 ]; then
45+
echo "${red}ExecuTorch: Failed to clone fusion g3."
46+
exit 1
47+
fi
48+
49+
git checkout 11230f47b587b074ba0881deb28beb85db566ac2

0 commit comments

Comments
 (0)