forked from jax-ml/jax
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from ROCm/ci-upstream-sync-66_1
CI: 12/19/24 upstream sync
- Loading branch information
Showing
139 changed files
with
6,147 additions
and
2,325 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Cloud TPU CI (presubmit) | ||
# | ||
# This job currently runs as a non-blocking presubmit. It is experimental and is currently being | ||
# tested to get to a stable state before we enable it as a blocking presubmit. | ||
name: CI - Cloud TPU (presubmit) | ||
on: | ||
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' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# This should also be set to read-only in the project settings, but it's nice to | ||
# document and enforce the permissions here. | ||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cloud-tpu-test: | ||
if: github.event.repository.fork == false | ||
strategy: | ||
fail-fast: false # don't cancel all jobs on failure | ||
matrix: | ||
tpu: [ | ||
{type: "v5e-8", cores: "8", runner: "linux-x86-ct5lp-224-8tpu"} | ||
] | ||
python-version: ["3.10"] | ||
|
||
name: "TPU test (jaxlib=head, ${{ matrix.tpu.type }})" | ||
|
||
env: | ||
JAXCI_PYTHON: python${{ matrix.python-version }} | ||
JAXCI_TPU_CORES: ${{ matrix.tpu.cores }} | ||
|
||
runs-on: ${{ matrix.tpu.runner }} | ||
container: "us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest" | ||
|
||
timeout-minutes: 60 | ||
|
||
defaults: | ||
run: | ||
shell: bash -ex {0} | ||
|
||
steps: | ||
# https://opensource.google/documentation/reference/github/services#actions | ||
# mandates using a specific commit for non-Google actions. We use | ||
# https://github.com/sethvargo/ratchet to pin specific versions. | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
# Checkout XLA at head, if we're building jaxlib at head. | ||
- name: Checkout XLA at head | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
repository: openxla/xla | ||
path: xla | ||
# We need to mark the GitHub workspace as safe as otherwise git commands will fail. | ||
- name: Mark GitHub workspace as safe | ||
run: | | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- name: Install JAX test requirements | ||
run: | | ||
$JAXCI_PYTHON -m pip install -U -r build/test-requirements.txt | ||
$JAXCI_PYTHON -m pip install -U -r build/collect-profile-requirements.txt | ||
- name: Build jaxlib at head with latest XLA | ||
run: | | ||
# Build and install jaxlib at head | ||
$JAXCI_PYTHON build/build.py build --wheels=jaxlib \ | ||
--python_version=${{ matrix.python-version }} \ | ||
--bazel_options=--config=rbe_linux_x86_64 \ | ||
--local_xla_path="$(pwd)/xla" \ | ||
--verbose | ||
# Install libtpu | ||
$JAXCI_PYTHON -m pip install --pre libtpu \ | ||
-f https://storage.googleapis.com/jax-releases/libtpu_releases.html | ||
# Halt for testing | ||
- name: Wait For Connection | ||
uses: google-ml-infra/actions/ci_connection@main | ||
with: | ||
halt-dispatch-input: ${{ inputs.halt-for-connection }} | ||
- name: Install jaxlib wheel and run tests | ||
run: ./ci/run_pytest_tpu.sh |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright 2024 The JAX Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
# This file contains all the docker specifc envs that are needed by the | ||
# ci/utilities/run_docker_container.sh script. | ||
|
||
os=$(uname -s | awk '{print tolower($0)}') | ||
arch=$(uname -m) | ||
|
||
# The path to the JAX git repository. | ||
export JAXCI_JAX_GIT_DIR=$(pwd) | ||
|
||
export JAXCI_DOCKER_WORK_DIR="/jax" | ||
export JAXCI_DOCKER_ARGS="" | ||
|
||
# TODO(b/384533574): Replace latest tagged images with sha or release specific | ||
# tags when we make the new release jobs as default. | ||
# Linux x86 image for building JAX artifacts, running Pytests CPU/TPU tests, and | ||
# Bazel tests | ||
if [[ $os == "linux" ]] && [[ $arch == "x86_64" ]]; then | ||
export JAXCI_DOCKER_IMAGE="us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest" | ||
fi | ||
|
||
# Linux Aarch64 image for building JAX artifacts, running Pytests CPU tests, and | ||
# Bazel tests | ||
if [[ $os == "linux" ]] && [[ $arch == "aarch64" ]]; then | ||
export JAXCI_DOCKER_IMAGE="us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-arm64:latest" | ||
fi | ||
|
||
# Windows image for building JAX artifacts, running Pytests CPU tests, and Bazel | ||
# tests | ||
if [[ $os =~ "msys_nt" ]]; then | ||
export JAXCI_DOCKER_IMAGE="us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/tf-test-windows:latest" | ||
fi |
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
Oops, something went wrong.