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
79 changes: 79 additions & 0 deletions .github/workflows/_test_backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Test Backend

on:
workflow_call:
inputs:
backend:
description: 'Backend to test (xnnpack, coreml, vulkan, qnn)'
required: true
type: string
flows:
description: 'JSON array of flows to test'
required: true
type: string
ref:
description: 'Git ref to checkout'
required: false
type: string
default: ${{ github.sha }}
timeout:
description: 'Job timeout in minutes'
required: false
type: number
default: 120
run-linux:
description: 'Whether to run Linux tests'
required: false
type: boolean
default: false
run-macos:
description: 'Whether to run macOS tests'
required: false
type: boolean
default: false

jobs:
test-backend-linux:
if: ${{ inputs.run-linux }}
strategy:
fail-fast: false
matrix:
flow: ${{ fromJSON(inputs.flows) }}
suite: [models, operators]

uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
ref: ${{ inputs.ref }}
runner: linux.4xlarge.memory
docker-image: ci-image:executorch-ubuntu-22.04-clang12
submodules: recursive
timeout: ${{ inputs.timeout }}
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"

test-backend-macos:
if: ${{ inputs.run-macos }}
strategy:
fail-fast: false
matrix:
flow: ${{ fromJSON(inputs.flows) }}
suite: [models, operators]

uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
with:
ref: ${{ inputs.ref }}
runner: macos-m1-stable
python-version: "3.12"
submodules: recursive
timeout: ${{ inputs.timeout }}
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

# This is needed to get the prebuilt PyTorch wheel from S3
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"
48 changes: 0 additions & 48 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,51 +36,3 @@ jobs:
uses: ./.github/workflows/_link_check.yml
with:
ref: ${{ github.sha }}

backend-test-linux:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
fail-fast: false
matrix:
flow: [
qnn, qnn_16a16w, qnn_16a8w, qnn_16a4w, qnn_16a4w_block, qnn_8a8w,
vulkan, vulkan_static_int8_per_channel,
xnnpack, xnnpack_dynamic_int8_per_channel, xnnpack_static_int8_per_channel, xnnpack_static_int8_per_tensor
]
suite: [models, operators]
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: linux.4xlarge.memory
docker-image: ci-image:executorch-ubuntu-22.04-clang12
submodules: recursive
timeout: 120
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"

backend-test-macos:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
flow: [coreml, coreml_static_int8]
suite: [models, operators]
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: macos-m1-stable
python-version: 3.12
submodules: recursive
timeout: 120
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

# This is needed to get the prebuilt PyTorch wheel from S3
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"
27 changes: 27 additions & 0 deletions .github/workflows/test-backend-coreml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test CoreML Backend

on:
schedule:
- cron: 0 2 * * *
push:
tags:
- ciflow/nightly/*
pull_request:
paths:
- .github/workflows/test-backend-coreml.yml
- .github/workflows/_test_backend.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
test-coreml:
uses: ./.github/workflows/_test_backend.yml
with:
backend: coreml
flows: '["coreml", "coreml_static_int8"]'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
run-macos: true
27 changes: 27 additions & 0 deletions .github/workflows/test-backend-qnn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test QNN Backend

on:
schedule:
- cron: 0 2 * * *
push:
tags:
- ciflow/nightly/*
pull_request:
paths:
- .github/workflows/test-backend-qnn.yml
- .github/workflows/_test_backend.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
test-qnn:
uses: ./.github/workflows/_test_backend.yml
with:
backend: qnn
flows: '["qnn", "qnn_16a16w", "qnn_16a8w", "qnn_16a4w", "qnn_16a4w_block", "qnn_8a8w"]'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
run-linux: true
27 changes: 27 additions & 0 deletions .github/workflows/test-backend-vulkan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test Vulkan Backend

on:
schedule:
- cron: 0 2 * * *
push:
tags:
- ciflow/nightly/*
pull_request:
paths:
- .github/workflows/test-backend-vulkan.yml
- .github/workflows/_test_backend.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
test-vulkan:
uses: ./.github/workflows/_test_backend.yml
with:
backend: vulkan
flows: '["vulkan", "vulkan_static_int8_per_channel"]'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
run-linux: true
27 changes: 27 additions & 0 deletions .github/workflows/test-backend-xnnpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test XNNPACK Backend

on:
schedule:
- cron: 0 2 * * *
push:
tags:
- ciflow/nightly/*
pull_request:
paths:
- .github/workflows/test-backend-xnnpack.yml
- .github/workflows/_test_backend.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
test-xnnpack:
uses: ./.github/workflows/_test_backend.yml
with:
backend: xnnpack
flows: '["xnnpack", "xnnpack_dynamic_int8_per_channel", "xnnpack_static_int8_per_channel", "xnnpack_static_int8_per_tensor"]'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 120
run-linux: true
Loading