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
16 changes: 11 additions & 5 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ jobs:
run: |
set -euxo pipefail
echo "::group::Cleanup debug output"
rm -rf "${GITHUB_WORKSPACE}"
# Clear the workspace without removing the directory itself. On an OSDC
# runner GITHUB_WORKSPACE is a bind mount into the job container, and
# deleting it detaches the mount: later steps fail with "getcwd: cannot
# access parent directories" and local actions resolve against a host
# path that no longer matches what the container sees. EC2 runners reuse
# the workspace between jobs, so its contents still need clearing.
find "${GITHUB_WORKSPACE}" -mindepth 1 -delete 2>/dev/null || true
mkdir -p "${GITHUB_WORKSPACE}"

if [[ "${{ inputs.architecture }}" = "aarch64" ]]; then
Expand Down Expand Up @@ -255,14 +261,14 @@ jobs:
source /opt/conda/etc/profile.d/conda.sh
conda config --set ssl_verify False
echo "/opt/conda/bin" >> $GITHUB_PATH
- uses: ./test-infra/.github/actions/set-channel
- uses: pytorch/test-infra/.github/actions/set-channel@main
- name: Set PYTORCH_VERSION
if: ${{ env.CHANNEL == 'test' }}
run: |
# When building RC, set the version to be the current candidate version,
# otherwise, leave it alone so nightly will pick up the latest
echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}"
- uses: ./test-infra/.github/actions/setup-binary-builds
- uses: pytorch/test-infra/.github/actions/setup-binary-builds@main
env:
PLATFORM: ${{ inputs.architecture == 'aarch64' && 'linux-aarch64' || ''}}
with:
Expand Down Expand Up @@ -311,7 +317,7 @@ jobs:
${CONDA_RUN} ${PIP_INSTALL_TORCH} ${{ inputs.pip-install-torch-extra-args }}
- name: Run Pre-Script with Caching
if: ${{ inputs.pre-script != '' }}
uses: ./test-infra/.github/actions/run-script-with-cache
uses: pytorch/test-infra/.github/actions/run-script-with-cache@main
with:
cache-path: ${{ inputs.cache-path }}
cache-key: ${{ inputs.cache-key }}
Expand Down Expand Up @@ -492,7 +498,7 @@ jobs:
done
- name: Run Post-Script
if: ${{ inputs.post-script != '' }}
uses: ./test-infra/.github/actions/run-script-with-cache
uses: pytorch/test-infra/.github/actions/run-script-with-cache@main
with:
repository: ${{ inputs.repository }}
script: ${{ inputs.post-script }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
with:
package-type: wheel
os: linux
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-sbsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
with:
package-type: wheel
os: linux-aarch64
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,13 @@ jobs:
run: |
set -euxo pipefail
echo "::group::Cleanup debug output"
rm -rfv "${GITHUB_WORKSPACE}"
# Clear the workspace without removing the directory itself. On an OSDC
# runner GITHUB_WORKSPACE is a bind mount into the job container, and
# deleting it detaches the mount: later steps fail with "getcwd: cannot
# access parent directories" and local actions resolve against a host
# path that no longer matches what the container sees. EC2 runners reuse
# the workspace between jobs, so its contents still need clearing.
find "${GITHUB_WORKSPACE}" -mindepth 1 -delete 2>/dev/null || true
mkdir -p "${GITHUB_WORKSPACE}"
echo "::endgroup::"
- uses: actions/checkout@v6
Expand All @@ -121,11 +127,11 @@ jobs:
ref: ${{ inputs.test-infra-ref }}
path: test-infra
- name: Setup SSH
uses: ./test-infra/.github/actions/setup-ssh
uses: pytorch/test-infra/.github/actions/setup-ssh@main
Comment thread
huydhn marked this conversation as resolved.
Resolved
with:
github-secret: ${{ github.token }}
- uses: ./test-infra/.github/actions/set-channel
- uses: ./test-infra/.github/actions/setup-binary-builds
- uses: pytorch/test-infra/.github/actions/set-channel@main
- uses: pytorch/test-infra/.github/actions/setup-binary-builds@main
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
Expand All @@ -144,7 +150,7 @@ jobs:
run: echo "ARTIFACT_NAME=${ARTIFACT_NAME}_rtx" >> "${GITHUB_ENV}"
- name: Run Pre-Script with Caching
if: ${{ inputs.pre-script != '' }}
uses: ./test-infra/.github/actions/run-script-with-cache
uses: pytorch/test-infra/.github/actions/run-script-with-cache@main
with:
cache-path: ${{ inputs.cache-path }}
cache-key: ${{ inputs.cache-key }}
Expand All @@ -164,7 +170,7 @@ jobs:
path: /opt/torch-tensorrt-builds/
# - name: Install torch and torch-tensorrt
# if: ${{ inputs.pre-script != '' }}
# uses: ./test-infra/.github/actions/run-script-with-cache
# uses: pytorch/test-infra/.github/actions/run-script-with-cache@main
# with:
# repository: ${{ inputs.repository }}
# script: .github/scripts/install-torch-tensorrt.sh
Expand All @@ -174,6 +180,33 @@ jobs:
with:
name: ${{ inputs.additional-artifact }}-${{ env.ARTIFACT_NAME_SUFFIX }}
path: /opt/torch-tensorrt-builds/
- name: Point the HuggingFace cache somewhere writable
# An OSDC runner mounts the shared model cache read-only at
# /mnt/hf_cache and exports HF_HOME pointing at it, so anything HF
# writes fails with "OSError: [Errno 30] Read-only file system".
#
# Pointing only HF_HOME at a writable dir is not enough: the hub's
# lock directory lives under HF_HUB_CACHE, so keeping that on the
# mount still fails in WeakFileLock on `.locks/models--<repo>/*.lock`
# -- even for a model that is already seeded there.
#
# So put the whole cache in RUNNER_TEMP. The trade is that models are
# downloaded per job instead of read from the shared mount; these
# suites pull a handful of small ones (bert-base-uncased,
# timm/efficientnet_b0), so that is cheap enough to prefer over
# splitting the paths.
shell: bash
run: |
set -euo pipefail
if [[ -d /mnt/hf_cache ]]; then
mkdir -p "${RUNNER_TEMP}/hf_home" "${RUNNER_TEMP}/hf_datasets"
{
echo "HF_HOME=${RUNNER_TEMP}/hf_home"
echo "HF_HUB_CACHE=${RUNNER_TEMP}/hf_home/hub"
echo "HF_DATASETS_CACHE=${RUNNER_TEMP}/hf_datasets"
} >> "${GITHUB_ENV}"
fi

- name: Pack script
continue-on-error: ${{ inputs.continue-on-error }}
working-directory: ${{ inputs.repository }}
Expand All @@ -189,7 +222,7 @@ jobs:
} > "user_script"
cat .github/scripts/install-torch-tensorrt.sh user_script > exec_script
- name: Run Script
uses: ./test-infra/.github/actions/run-script-with-cache
uses: pytorch/test-infra/.github/actions/run-script-with-cache@main
with:
repository: ${{ inputs.repository }}
script: exec_script
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
package-type: wheel
os: linux-aarch64
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-linux-aarch64_rtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
package-type: wheel
os: linux-aarch64
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
package-type: wheel
os: linux
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-linux-x86_64_rtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
package-type: wheel
os: linux
runner-fleet: osdc
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-rocm: false
Expand Down
10 changes: 10 additions & 0 deletions tests/ci/suites.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ def __post_init__(self) -> None:
paths=("api/",),
setup=("hub",),
variants=("standard",),
# g5.8xlarge rather than the default g5.4xlarge validation runner:
# this suite was dying on the smaller pod without surfacing a test
# failure -- in one run the container hook reported the RPC server
# process dying mid-step. Same single A10G, more CPU and RAM.
runner="mt-l-x86aavx2-29-113-a10g",
),
]

Expand Down Expand Up @@ -245,6 +250,11 @@ def __post_init__(self) -> None:
lanes=("full", "nightly"),
paths=("models/",),
markers="critical",
# g5.8xlarge rather than the default g5.4xlarge validation runner:
# this suite was dying on the smaller pod without surfacing a test
# failure -- in one run the container hook reported the RPC server
# process dying mid-step. Same single A10G, more CPU and RAM.
runner="mt-l-x86aavx2-29-113-a10g",
),
Suite(
"torch-compile-backend",
Expand Down
4 changes: 3 additions & 1 deletion tests/py/dynamo/executorch/test_executorch_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ def test_shared_workflows_export_the_row_cuda_channel() -> None:
setup = next(
s
for s in job["steps"]
if s.get("uses", "").endswith("/setup-binary-builds")
# split off any @ref: these actions are referenced by repo
# (pytorch/test-infra/...@main), not by a relative path.
if s.get("uses", "").split("@")[0].endswith("/setup-binary-builds")
)
assert setup["with"]["cuda-version"] == "${{ env.CU_VERSION }}", filename
assert all("CU_VERSION" not in s.get("env", {}) for s in job["steps"]), filename
Expand Down
Loading