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 branch 'rocm-main' into jax-mlgh-9948-add-gpu-ci
- Loading branch information
Showing
159 changed files
with
6,008 additions
and
2,399 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI - Bazel GPU tests (RBE) | ||
|
||
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' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run_tests: | ||
if: github.event.repository.fork == false | ||
strategy: | ||
matrix: | ||
runner: ["linux-x86-n2-16"] | ||
|
||
runs-on: ${{ matrix.runner }} | ||
container: 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest' | ||
|
||
env: | ||
JAXCI_HERMETIC_PYTHON_VERSION: "3.12" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Wait For Connection | ||
uses: google-ml-infra/actions/ci_connection@main | ||
with: | ||
halt-dispatch-input: ${{ inputs.halt-for-connection }} | ||
- name: Run Bazel GPU Tests with RBE | ||
run: ./ci/run_bazel_test_gpu_rbe.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
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,51 @@ | ||
#!/bin/bash | ||
# 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. | ||
# ============================================================================== | ||
# Runs Bazel GPU tests with RBE. This runs single accelerator tests with one | ||
# GPU apiece on RBE. | ||
# | ||
# -e: abort script if one command fails | ||
# -u: error if undefined variable used | ||
# -x: log all commands | ||
# -o history: record shell history | ||
# -o allexport: export all functions and variables to be available to subscripts | ||
set -exu -o history -o allexport | ||
|
||
# Source default JAXCI environment variables. | ||
source ci/envs/default.env | ||
|
||
# Clone XLA at HEAD if path to local XLA is not provided | ||
if [[ -z "$JAXCI_XLA_GIT_DIR" ]]; then | ||
export JAXCI_CLONE_MAIN_XLA=1 | ||
fi | ||
|
||
# Set up the build environment. | ||
source "ci/utilities/setup_build_environment.sh" | ||
|
||
# Run Bazel GPU tests with RBE (single accelerator tests with one GPU apiece). | ||
echo "Running RBE GPU tests..." | ||
|
||
bazel test --config=rbe_linux_x86_64_cuda \ | ||
--repo_env=HERMETIC_PYTHON_VERSION="$JAXCI_HERMETIC_PYTHON_VERSION" \ | ||
--override_repository=xla="${JAXCI_XLA_GIT_DIR}" \ | ||
--test_env=XLA_PYTHON_CLIENT_ALLOCATOR=platform \ | ||
--test_output=errors \ | ||
--test_env=TF_CPP_MIN_LOG_LEVEL=0 \ | ||
--test_env=JAX_EXCLUDE_TEST_TARGETS=PmapTest.testSizeOverflow \ | ||
--test_tag_filters=-multiaccelerator \ | ||
--test_env=JAX_SKIP_SLOW_TESTS=true \ | ||
--action_env=JAX_ENABLE_X64=0 \ | ||
--color=yes \ | ||
//tests:gpu_tests //tests:backend_independent_tests //tests/pallas:gpu_tests //tests/pallas:backend_independent_tests |
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.