Add CI workflow for tests that requires pytorch CUDA. #8239
This file contains 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
name: Build and test | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- r[0-9]+.[0-9]+ | ||
paths-ignore: | ||
- 'experimental/torch_xla2/**' | ||
push: | ||
branches: | ||
- master | ||
- r[0-9]+.[0-9]+ | ||
paths-ignore: | ||
- 'experimental/torch_xla2/**' | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }} | ||
cancel-in-progress: true | ||
jobs: | ||
build-torch-xla: | ||
name: "Build PyTorch/XLA" | ||
uses: ./.github/workflows/_build_torch_xla.yml | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_tpuvm | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
build-torch-with-cuda-xla-with-cuda: | ||
name: "Build PyTorch with CUDA and PyTorch/XLA" | ||
uses: ./.github/workflows/_build_torch_with_cuda_and_xla.yml | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_cuda_12.1 | ||
runner: linux.8xlarge.nvidia.gpu | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
build-cuda-plugin: | ||
name: "Build XLA CUDA plugin" | ||
uses: ./.github/workflows/_build_plugin.yml | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_cuda_12.1 | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
test-python-cpu: | ||
name: "CPU tests" | ||
uses: ./.github/workflows/_test.yml | ||
Check failure on line 50 in .github/workflows/build_and_test.yml GitHub Actions / Build and testInvalid workflow file
|
||
needs: build-torch-xla | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_tpuvm | ||
timeout-minutes: 120 | ||
collect-coverage: false | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
test-cuda: | ||
name: "GPU tests" | ||
uses: ./.github/workflows/_test.yml | ||
needs: [build-torch-xla, build-cuda-plugin] | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_cuda_12.1 | ||
runner: linux.8xlarge.nvidia.gpu | ||
timeout-minutes: 300 | ||
collect-coverage: false | ||
install-cuda-plugin: true | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
test-cuda-with-pytorch-cuda-enabled: | ||
name: "GPU tests with PyTorch CUDA enabled" | ||
uses: ./.github/workflows/_test.yml | ||
needs: [build-torch-with-cuda-xla-with-cuda] | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_cuda_12.1 | ||
runner: linux.8xlarge.nvidia.gpu | ||
timeout-minutes: 300 | ||
collect-coverage: false | ||
install-cuda-plugin: true | ||
secrets: | ||
gcloud-service-key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
test-tpu: | ||
name: "TPU tests" | ||
uses: ./.github/workflows/_tpu_ci.yml | ||
needs: build-torch-xla | ||
# Only run this for HEAD and releases | ||
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'tpuci') | ||
push-docs: | ||
name: "Build docs" | ||
uses: ./.github/workflows/_docs.yml | ||
needs: build-torch-xla | ||
with: | ||
dev-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.10_tpuvm | ||
secrets: | ||
torchxla-bot-token: ${{ secrets.TORCH_XLA_BOT_TOKEN }} |