mirror of
https://github.com/ROCm/jax.git
synced 2025-04-16 11:56:07 +00:00
Add new CI script for running Bazel GPU presubmits
PiperOrigin-RevId: 697643622
This commit is contained in:
parent
65f9c7855e
commit
14187399d7
39
.github/workflows/bazel_gpu_rbe.yml
vendored
Normal file
39
.github/workflows/bazel_gpu_rbe.yml
vendored
Normal file
@ -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
|
51
ci/run_bazel_test_gpu_rbe.sh
Executable file
51
ci/run_bazel_test_gpu_rbe.sh
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user