Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 9 additions & 3 deletions .ci/scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ setup_macos_env_variables
# buck2 atm
install_buck
brew install libomp
install_pip_dependencies

# TODO(huydhn): Unlike our self-hosted runner, GitHub runner doesn't have access
# to our infra, so compiler caching needs to be setup differently using GitHub
Expand All @@ -125,10 +124,17 @@ if [[ -z "${GITHUB_RUNNER:-}" ]]; then
install_sccache
fi

# Install pinned torch before requirements-ci.txt so torchsr's transitive
# torch dep is satisfied by the existing install and pip does not pull a
# separate copy from PyPI. sccache is initialized above so source-build
# cache misses still hit the cache.
print_cmake_info
install_pytorch_and_domains
# We build PyTorch from source here instead of using nightly. This allows CI to test against
# the pinned commit from PyTorch

install_pip_dependencies

# install_executorch's --use-pt-pinned-commit skips re-installing torch since
# install_pytorch_and_domains already installed the pinned build above.
if [[ "$EDITABLE" == "true" ]]; then
install_executorch --use-pt-pinned-commit --editable
else
Expand Down
4 changes: 4 additions & 0 deletions .ci/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ install_pytorch_and_domains() {
if [[ "${torch_wheel_not_found}" == "1" ]]; then
echo "No cached wheel found, continue with building PyTorch at ${TORCH_VERSION}"

# Install PyTorch's own build-time deps so the source build does not
# silently inherit them from whatever else happens to be in the env
# (e.g. executorch's requirements-ci.txt).
pip install -r requirements-build.txt
git submodule update --init --recursive
USE_DISTRIBUTED=1 python setup.py bdist_wheel
pip install "$(echo dist/*.whl)"
Expand Down
Loading