Skip to content
Merged
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
8 changes: 7 additions & 1 deletion .ci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ MINICONDA_VERSION=23.10.0-1
BUCK2_VERSION=$(cat ci_commit_pins/buck2.txt)

case "${IMAGE_NAME}" in
executorch-ubuntu-22.04-gcc9)
executorch-ubuntu-22.04-gcc11)
LINTRUNNER=""
GCC_VERSION=11
;;
executorch-ubuntu-22.04-gcc9-nopytorch)
LINTRUNNER=""
GCC_VERSION=9
SKIP_PYTORCH=yes
;;
executorch-ubuntu-22.04-clang12)
LINTRUNNER=""
Expand Down Expand Up @@ -95,6 +100,7 @@ docker build \
--build-arg "QNN_SDK=${QNN_SDK:-}" \
--build-arg "MEDIATEK_SDK=${MEDIATEK_SDK:-}" \
--build-arg "ANDROID_NDK_VERSION=${ANDROID_NDK_VERSION:-}" \
--build-arg "SKIP_PYTORCH=${SKIP_PYTORCH:-}" \
-f "${OS}"/Dockerfile \
"$@" \
.
3 changes: 2 additions & 1 deletion .ci/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ ENV SCCACHE_S3_KEY_PREFIX executorch
ENV SCCACHE_REGION us-east-1

ARG TORCH_VERSION
ARG SKIP_PYTORCH
COPY ./common/install_pytorch.sh install_pytorch.sh
COPY ./common/utils.sh utils.sh
RUN bash ./install_pytorch.sh && rm install_pytorch.sh utils.sh
RUN if [ -z "${SKIP_PYTORCH}" ]; then bash ./install_pytorch.sh; fi && rm install_pytorch.sh utils.sh

ARG LINTRUNNER
# Install lintrunner if needed
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
matrix:
runner: [linux.4xlarge]
docker-image-name: [
executorch-ubuntu-22.04-gcc9,
executorch-ubuntu-22.04-gcc11,
executorch-ubuntu-22.04-gcc9-nopytorch,
executorch-ubuntu-22.04-clang12,
executorch-ubuntu-22.04-linter,
executorch-ubuntu-22.04-arm-sdk,
Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:

- name: Build docker image
id: build-docker-image
timeout-minutes: 45
timeout-minutes: 145
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout has been increased from 45 to 145 minutes (over 3x increase). This seems excessive. Building the gcc9-nopytorch container should actually be faster than building the gcc11 container since it skips PyTorch installation. Consider using a more reasonable timeout value (e.g., 60-90 minutes) unless there's a specific reason for this large increase.

Suggested change
timeout-minutes: 145
timeout-minutes: 90

Copilot uses AI. Check for mistakes.
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
with:
docker-image-name: ci-image:${{ matrix.docker-image-name }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
fail-fast: false
with:
runner: linux.2xlarge
docker-image: ci-image:executorch-ubuntu-22.04-gcc9
docker-image: ci-image:executorch-ubuntu-22.04-gcc11
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
Expand Down Expand Up @@ -391,7 +391,7 @@ jobs:
fail-fast: false
with:
runner: linux.2xlarge
docker-image: ci-image:executorch-ubuntu-22.04-gcc9
docker-image: ci-image:executorch-ubuntu-22.04-gcc9-nopytorch
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
Expand All @@ -400,15 +400,16 @@ jobs:
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"

./install_requirements.sh --use-pt-pinned-commit
./install_requirements.sh
# build module for executorch.extension.pybindings.portable_lib
bash test/build_size_test.sh
strip cmake-out/test/size_test
output=$(ls -la cmake-out/test/size_test)
arr=($output)
size=${arr[4]}
# threshold=48120 on devserver with gcc11.4
# threshold=48120 on devserver with gcc9
# todo(lfq): update once binary size is below 50kb.
# Note: using gcc9-nopytorch container with pinned nightly PyTorch
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "pinned nightly PyTorch" which is contradictory. PyTorch is either pinned (to a specific version/commit) or it's nightly (latest), not both. Since line 403 calls ./install_requirements.sh without the --use-pt-pinned-commit flag, the script will install the nightly version (as defined in install_requirements.py line 185: use_pytorch_nightly = not bool(args.use_pt_pinned_commit)). The comment should be updated to say either "nightly PyTorch" or if a pinned version is intended, the flag should be added back.

Suggested change
# Note: using gcc9-nopytorch container with pinned nightly PyTorch
# Note: using gcc9-nopytorch container with nightly PyTorch

Copilot uses AI. Check for mistakes.
threshold="63776"
if [[ "$size" -le "$threshold" ]]; then
echo "Success $size <= $threshold"
Expand Down Expand Up @@ -793,7 +794,7 @@ jobs:
fail-fast: false
with:
runner: linux.2xlarge
docker-image: ci-image:executorch-ubuntu-22.04-gcc9
docker-image: ci-image:executorch-ubuntu-22.04-gcc11
submodules: 'recursive'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
Expand Down
Loading