Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change et install directory to et-build from build, which now conflic… #227

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions scripts/install_et.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ install_pip_dependencies() {
}

install_executorch() {
echo "Cloning executorch to ${TORCHCHAT_ROOT}/build/src"
rm -rf ${TORCHCHAT_ROOT}/build
mkdir -p ${TORCHCHAT_ROOT}/build/src
pushd ${TORCHCHAT_ROOT}/build/src
echo "Cloning executorch to ${TORCHCHAT_ROOT}/et-build/src"
rm -rf ${TORCHCHAT_ROOT}/et-build
mkdir -p ${TORCHCHAT_ROOT}/et-build/src
pushd ${TORCHCHAT_ROOT}/et-build/src
git clone https://github.com/pytorch/executorch.git
cd executorch
echo "Install executorch: submodule update"
git submodule sync
git submodule update --init

echo "Applying fixes"
cp ${TORCHCHAT_ROOT}/scripts/fixes_et/module.cpp ${TORCHCHAT_ROOT}/build/src/executorch/extension/module/module.cpp # ET uses non-standard C++ that does not compile in GCC
cp ${TORCHCHAT_ROOT}/scripts/fixes_et/managed_tensor.h ${TORCHCHAT_ROOT}/build/src/executorch/extension/runner_util/managed_tensor.h # ET is missing headers for vector/memory. This causes downstream issues when building runner-et.
cp ${TORCHCHAT_ROOT}/scripts/fixes_et/module.cpp ${TORCHCHAT_ROOT}/et-build/src/executorch/extension/module/module.cpp # ET uses non-standard C++ that does not compile in GCC
cp ${TORCHCHAT_ROOT}/scripts/fixes_et/managed_tensor.h ${TORCHCHAT_ROOT}/et-build/src/executorch/extension/runner_util/managed_tensor.h # ET is missing headers for vector/memory. This causes downstream issues when building runner-et.

echo "Building and installing python libraries"
echo "Building and installing python libraries"
Expand All @@ -50,7 +50,7 @@ install_executorch() {
mkdir cmake-out
cmake -DCMAKE_BUILD_TYPE=Release -DEXECUTORCH_BUILD_OPTIMIZED=ON -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON -DEXECUTORCH_BUILD_XNNPACK=ON -S . -B cmake-out -G Ninja
cmake --build cmake-out
cmake --install cmake-out --prefix ${TORCHCHAT_ROOT}/build/install
cmake --install cmake-out --prefix ${TORCHCHAT_ROOT}/et-build/install
popd
}

Expand Down
Loading