Test CI scripts and workflows #105
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
| name: Run Bazel GPU tests (non RBE) | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| halt-for-connection: | |
| description: 'Should this workflow run wait for a remote connection?' | |
| type: choice | |
| required: true | |
| default: 'no' | |
| options: | |
| - 'yes' | |
| - 'no' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_artifacts: | |
| name: "Build the jaxlib and CUDA plugins using latest XLA" | |
| uses: ./.github/workflows/build_artifacts.yml | |
| with: | |
| wheel_list: "jaxlib,jax-cuda-plugin,jax-cuda-pjrt" | |
| python_list: "3.11" | |
| platform_list: "linux_x86" | |
| clone_main_xla: 1 | |
| upload_artifacts: true | |
| upload_destination_prefix: '${{ github.workflow }}/${{ github.run_number }}/${{ github.run_attempt }}' | |
| run_bazel_tests: | |
| needs: build_artifacts | |
| runs-on: "linux-x86-g2-48-l4-4gpu" | |
| strategy: | |
| fail-fast: false # don't cancel all jobs on failure | |
| matrix: | |
| enable-x_64: [1] #, 0] | |
| container-list: [ | |
| {name: "nosla", image: "gcr.io/tensorflow-testing/nosla-cuda12.3-cudnn9.1-ubuntu20.04-manylinux2014-multipython"}, | |
| {name: "ml-build", image: "us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest"} | |
| ] | |
| container: ${{ matrix.container-list.image }} | |
| env: | |
| JAXCI_HERMETIC_PYTHON_VERSION: 3.11 | |
| JAXCI_ENABLE_X64: ${{ matrix.enable-x_64 }} | |
| name: "Bazel single accelerator and multi-accelerator GPU tests (Non RBE, linux-x86-g2-48-l4-4gpu, Python 3.11, x64=${{ matrix.enable-x_64 }}, image=${{ matrix.container-list.name }})" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # Halt for testing | |
| - name: Wait For Connection | |
| uses: google-ml-infra/actions/ci_connection@main | |
| with: | |
| halt-dispatch-input: ${{ inputs.halt-for-connection }} | |
| - name: Set Platform | |
| run: | | |
| os=$(uname -s | awk '{print tolower($0)}') | |
| arch=$(uname -m) | |
| # Adjust name for Windows | |
| if [[ $os =~ "msys_nt" ]]; then | |
| os="windows" | |
| fi | |
| echo "PLATFORM=${os}_${arch}" >> $GITHUB_ENV | |
| - name: Download the artifacts built in the "build_artifacts" job | |
| run: mkdir -p $(pwd)/dist && gsutil -m cp -r gs://general-ml-ci-transient/jax-github-actions/"${{ github.workflow }}"/${{ github.run_number }}/${{ github.run_attempt }}/$PLATFORM/python${JAXCI_HERMETIC_PYTHON_VERSION}/*.whl $(pwd)/dist/ | |
| - name: Run Bazel GPU tests locally | |
| run: ./ci/run_bazel_test_gpu_non_rbe.sh |