Skip to content

Commit 1d00f65

Browse files
committed
Update
[ghstack-poisoned]
1 parent db1e176 commit 1d00f65

File tree

5 files changed

+45
-27
lines changed

5 files changed

+45
-27
lines changed

.github/workflows/_test_backend.yml

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ on:
1111
description: 'JSON array of flows to test'
1212
required: true
1313
type: string
14-
runner:
15-
description: 'Runner to use'
16-
required: true
17-
type: string
18-
docker-image:
19-
description: 'Docker image to use (Linux only)'
20-
required: false
21-
type: string
22-
python-version:
23-
description: 'Python version to use (macOS only)'
24-
required: false
25-
type: string
2614
ref:
2715
description: 'Git ref to checkout'
2816
required: false
@@ -33,31 +21,65 @@ on:
3321
required: false
3422
type: number
3523
default: 120
24+
run-linux:
25+
description: 'Whether to run Linux tests'
26+
required: false
27+
type: boolean
28+
default: false
29+
run-macos:
30+
description: 'Whether to run macOS tests'
31+
required: false
32+
type: boolean
33+
default: false
3634

3735
jobs:
38-
test-backend:
36+
test-backend-linux:
37+
if: ${{ inputs.run-linux }}
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
flow: ${{ fromJSON(inputs.flows) }}
42+
suite: [models, operators]
43+
44+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
45+
permissions:
46+
id-token: write
47+
contents: read
48+
with:
49+
ref: ${{ inputs.ref }}
50+
runner: linux.4xlarge.memory
51+
docker-image: ci-image:executorch-ubuntu-22.04-clang12
52+
submodules: recursive
53+
timeout: ${{ inputs.timeout }}
54+
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
55+
script: |
56+
set -eux
57+
58+
source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"
59+
60+
test-backend-macos:
61+
if: ${{ inputs.run-macos }}
3962
strategy:
4063
fail-fast: false
4164
matrix:
4265
flow: ${{ fromJSON(inputs.flows) }}
4366
suite: [models, operators]
4467

45-
uses: ${{ contains(inputs.runner, 'macos') && 'pytorch/test-infra/.github/workflows/macos_job.yml@main' || 'pytorch/test-infra/.github/workflows/linux_job_v2.yml@main' }}
68+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
4669
permissions:
4770
id-token: write
4871
contents: read
4972
with:
5073
ref: ${{ inputs.ref }}
51-
runner: ${{ inputs.runner }}
52-
docker-image: ${{ inputs.docker-image }}
53-
python-version: ${{ inputs.python-version }}
74+
runner: macos-m1-stable
75+
python-version: "3.12"
5476
submodules: recursive
5577
timeout: ${{ inputs.timeout }}
5678
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
5779
script: |
5880
set -eux
5981
60-
${{ contains(inputs.runner, 'macos') && '# This is needed to get the prebuilt PyTorch wheel from S3
82+
# This is needed to get the prebuilt PyTorch wheel from S3
6183
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
6284
63-
source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' || 'source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' }}
85+
source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"

.github/workflows/test-backend-coreml.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
backend: coreml
2424
flows: '["coreml", "coreml_static_int8"]'
25-
runner: macos-m1-stable
26-
python-version: "3.12"
2725
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2826
timeout: 120
27+
run-macos: true

.github/workflows/test-backend-qnn.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
backend: qnn
2424
flows: '["qnn", "qnn_16a16w", "qnn_16a8w", "qnn_16a4w", "qnn_16a4w_block", "qnn_8a8w"]'
25-
runner: linux.4xlarge.memory
26-
docker-image: ci-image:executorch-ubuntu-22.04-clang12
2725
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2826
timeout: 120
27+
run-linux: true

.github/workflows/test-backend-vulkan.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
backend: vulkan
2424
flows: '["vulkan", "vulkan_static_int8_per_channel"]'
25-
runner: linux.4xlarge.memory
26-
docker-image: ci-image:executorch-ubuntu-22.04-clang12
2725
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2826
timeout: 120
27+
run-linux: true

.github/workflows/test-backend-xnnpack.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
backend: xnnpack
2424
flows: '["xnnpack", "xnnpack_dynamic_int8_per_channel", "xnnpack_static_int8_per_channel", "xnnpack_static_int8_per_tensor"]'
25-
runner: linux.4xlarge.memory
26-
docker-image: ci-image:executorch-ubuntu-22.04-clang12
2725
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2826
timeout: 120
27+
run-linux: true

0 commit comments

Comments
 (0)