Skip to content

Commit 56e74d5

Browse files
committed
Update on "[executorch] show backend test infra pass rate of CUDA backend to PyTorch HUD"
Add infrastructure to track CUDA backend test pass rates on PyTorch HUD dashboard over time Differential Revision: [D95335059](https://our.internmc.facebook.com/intern/diff/D95335059/) [ghstack-poisoned]
2 parents 568a9c1 + df23ea4 commit 56e74d5

3 files changed

Lines changed: 44 additions & 6 deletions

File tree

.ci/scripts/test_backend.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ if [[ "$FLOW" == *cuda* ]]; then
6363
echo "Installing newer libstdc++ for CUDA backend..."
6464
conda install -y -c conda-forge 'libstdcxx-ng>=12'
6565
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH:-}"
66+
67+
# CUDA backend uses the generic PyTorch test-infra Docker image (not the
68+
# custom executorch image), so PyTorch is NOT pre-installed from a pinned
69+
# commit. Install executorch with nightly PyTorch (which auto-detects
70+
# CUDA via nvcc) and then build the runner manually.
71+
echo "Installing ExecuTorch with nightly PyTorch (CUDA-enabled)..."
72+
./install_executorch.sh --editable
73+
CMAKE_ARGS="$EXTRA_BUILD_ARGS" source .ci/scripts/utils.sh
74+
build_executorch_runner cmake Release
75+
CUDA_SETUP_DONE=1
6676
fi
6777

6878
if [[ "$FLOW" == *arm* ]]; then
@@ -87,12 +97,14 @@ if [[ "$FLOW" == *arm* ]]; then
8797
fi
8898
fi
8999

90-
if [[ $IS_MACOS -eq 1 ]]; then
91-
SETUP_SCRIPT=.ci/scripts/setup-macos.sh
92-
else
93-
SETUP_SCRIPT=.ci/scripts/setup-linux.sh
100+
if [[ "${CUDA_SETUP_DONE:-0}" != "1" ]]; then
101+
if [[ $IS_MACOS -eq 1 ]]; then
102+
SETUP_SCRIPT=.ci/scripts/setup-macos.sh
103+
else
104+
SETUP_SCRIPT=.ci/scripts/setup-linux.sh
105+
fi
106+
CMAKE_ARGS="$EXTRA_BUILD_ARGS" ${CONDA_RUN_CMD} $SETUP_SCRIPT --build-tool cmake --build-mode Release --editable true
94107
fi
95-
CMAKE_ARGS="$EXTRA_BUILD_ARGS" ${CONDA_RUN_CMD} $SETUP_SCRIPT --build-tool cmake --build-mode Release --editable true
96108

97109
GOLDEN_DIR="${ARTIFACT_DIR}/golden-artifacts"
98110
export GOLDEN_ARTIFACTS_DIR="${GOLDEN_DIR}"

.github/workflows/_test_backend.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,26 @@ on:
3636
required: false
3737
type: string
3838
default: linux.4xlarge.memory
39+
docker-image:
40+
description: 'Docker image for Linux jobs'
41+
required: false
42+
type: string
43+
default: ci-image:executorch-ubuntu-22.04-clang12
44+
use-custom-docker-registry:
45+
description: 'Whether to use a custom Docker registry (set false for CUDA to use default PyTorch test-infra images)'
46+
required: false
47+
type: boolean
48+
default: true
49+
gpu-arch-type:
50+
description: 'GPU architecture type (e.g. cuda)'
51+
required: false
52+
type: string
53+
default: ''
54+
gpu-arch-version:
55+
description: 'GPU architecture version (e.g. 12.6)'
56+
required: false
57+
type: string
58+
default: ''
3959

4060
jobs:
4161
test-backend-linux:
@@ -50,7 +70,10 @@ jobs:
5070
with:
5171
ref: ${{ inputs.ref }}
5272
runner: ${{ inputs.runner-linux }}
53-
docker-image: ci-image:executorch-ubuntu-22.04-clang12
73+
docker-image: ${{ inputs.docker-image }}
74+
use-custom-docker-registry: ${{ inputs.use-custom-docker-registry }}
75+
gpu-arch-type: ${{ inputs.gpu-arch-type }}
76+
gpu-arch-version: ${{ inputs.gpu-arch-version }}
5477
submodules: recursive
5578
timeout: ${{ inputs.timeout }}
5679
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
timeout: 120
3030
run-linux: true
3131
runner-linux: linux.g5.4xlarge.nvidia.gpu
32+
use-custom-docker-registry: false
33+
gpu-arch-type: cuda
34+
gpu-arch-version: '12.6'
3235

3336
upload-test-results:
3437
needs: test-cuda

0 commit comments

Comments
 (0)