Use cuda version PT when build with CUDA delegate #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test ExecutorTorch CUDA Build Compatibility | |
# This workflow tests whether ExecutorTorch can be successfully built with CUDA support | |
# across different CUDA versions (12.6, 12.8, 12.9) using the command: | |
# CMAKE_ARGS="-DEXECUTORCH_BUILD_CUDA=ON" ./install_executorch.sh | |
# | |
# Note: ExecutorTorch automatically detects the system CUDA version using nvcc and | |
# installs the appropriate PyTorch wheel. No manual CUDA/PyTorch installation needed. | |
name: Test CUDA Builds | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release/* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }} | |
cancel-in-progress: false | |
jobs: | |
test-cuda-builds: | |
strategy: | |
fail-fast: false | |
matrix: | |
cuda-version: ["12.6", "12.8", "12.9"] | |
name: test-executorch-cuda-build-${{ matrix.cuda-version }} | |
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main | |
permissions: | |
id-token: write | |
contents: read | |
with: | |
timeout: 90 | |
runner: linux.g5.4xlarge.nvidia.gpu | |
gpu-arch-type: cuda | |
gpu-arch-version: ${{ matrix.cuda-version }} | |
use-custom-docker-registry: false | |
submodules: recursive | |
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
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 | |
# Test ExecutorTorch CUDA build - ExecutorTorch will automatically detect CUDA version | |
# and install the appropriate PyTorch wheel when CMAKE_ARGS="-DEXECUTORCH_BUILD_CUDA=ON" | |
source .ci/scripts/test-cuda-build.sh "${{ matrix.cuda-version }}" | |
# This job will fail if any of the CUDA versions fail | |
check-all-cuda-builds: | |
needs: test-cuda-builds | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Check if all CUDA builds succeeded | |
run: | | |
if [[ "${{ needs.test-cuda-builds.result }}" != "success" ]]; then | |
echo "ERROR: One or more ExecutorTorch CUDA builds failed!" | |
echo "CUDA build results: ${{ needs.test-cuda-builds.result }}" | |
exit 1 | |
else | |
echo "SUCCESS: All ExecutorTorch CUDA builds (12.6, 12.8, 12.9) completed successfully!" | |
fi |