Skip to content

Create a workflow to run benchmarks #28

Create a workflow to run benchmarks

Create a workflow to run benchmarks #28

Workflow file for this run

name: Benchmarks
on:
pull_request:
branches:
- main
jobs:
# jax-build:
# strategy:
# matrix:
# runner: ["linux-x86-g2-48-l4-4gpu"]
# runs-on: ${{ matrix.runner }}
# container:
# image: "gcr.io/tensorflow-testing/nosla-cuda12.3-cudnn9.1-ubuntu20.04-manylinux2014-multipython:latest"
# env:
# JAXCI_HERMETIC_PYTHON_VERSION: 3.11
# steps:
# - name: Checkout JAX Fork
# uses: actions/checkout@v3
# with:
# repository: 'google-ml-infra/jax-fork'
# path: jax-fork
# - name: Install JAX Dependencies
# working-directory: jax-fork
# run: |
# python -m pip install --upgrade pip
# pip install pytest
# pip install absl-py
# pip install "jax[cuda12_pip]" # Adjust CUDA version if needed
# pip install google-benchmark
# - name: Run JAX Multiprocess GPU Test
# working-directory: jax-fork
# continue-on-error: true
# run: python -m pytest tests/multiprocess_gpu_test.py
# - name: Build XLA GPU Atomic Test
# working-directory: xla
# continue-on-error: true
# run: bazel build -c opt --config=cuda //xla/service/gpu/tests:gpu_atomic_test
# - name: Run XLA GPU Atomic Test
# working-directory: xla
# continue-on-error: true
# run: bazel test -c opt --config=cuda //xla/service/gpu/tests:gpu_atomic_test
xla-gpu-ci:
runs-on: linux-x86-g2-48-l4-4gpu # Or another suitable GPU runner
container:
image: "gcr.io/tensorflow-testing/nosla-cuda12.3-cudnn9.1-ubuntu20.04-manylinux2014-multipython:latest"
steps:
- name: Checkout XLA with submodules
uses: actions/checkout@v3
with:
repository: openxla/xla
path: xla
submodules: recursive
- name: Install Docker
run: |
apt-get update -y
apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
## Add this line to import the Docker GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -y
apt-get install -y docker-ce docker-ce-cli containerd.io
# Add any necessary Docker configuration here, if required
- name: Pull Docker image
run: docker run --name xla_gpu -w /xla -it -d --rm -v $PWD:/xla tensorflow/build:latest-python3.9 bash