Skip to content

Handle symbolic dimensions in pydantic serialization of vmap_axes. #3643

Handle symbolic dimensions in pydantic serialization of vmap_axes.

Handle symbolic dimensions in pydantic serialization of vmap_axes. #3643

Workflow file for this run

name: CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
# Event manually triggered (in the Github UI)
workflow_dispatch:
# Constants for the workflow that are shared across jobs.
env:
JAX_ENABLE_X64: 0
JAX_TRACEBACK_FILTERING: off
permissions:
contents: read
# We should cancel the previous run if it's still running and there is a new commit.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
# These jobs should build Tokamax and run the tests on Google Cloud resources.
jobs:
attention-tests:
strategy:
matrix:
runner: ['linux-x86-a3-8g-h100-1gpu', 'linux-x86-ct6e-44-1tpu']
pytest_command: [
'base_test.py',
'api_test.py',
'pallas_mosaic_gpu_test.py',
'pallas_triton_test.py',
'jax_nn_test.py',
'xla_chunked_test.py',
]
include:
- runner: 'linux-x86-a3-8g-h100-1gpu'
device: 'cuda'
- runner: 'linux-x86-ct6e-44-1tpu'
device: 'tpu'
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
container: 'us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-cuda13.2-cudnn9.15'
timeout-minutes: 300
steps:
- name: Checkout Tokamax
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install dependencies
run: |
python3.12 -m uv pip install --upgrade pip
python3.12 -m uv pip --version
python3.12 -m uv pip install -e .[${{ matrix.device }},test]
python3.12 -m uv pip freeze
- name: Test Tokamax ops with unittest
run: |
pytest -s -m "not long" --ignore-glob="*/test_base.py" tokamax/_src/ops/attention/${{ matrix.pytest_command }}
tokamax-presubmit-ops-tests:
strategy:
matrix:
runner: ['linux-x86-a3-8g-h100-1gpu', 'linux-x86-ct6e-44-1tpu']
include:
- runner: 'linux-x86-a3-8g-h100-1gpu'
device: 'cuda'
- runner: 'linux-x86-ct6e-44-1tpu'
device: 'tpu'
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
container:
# Docker image will include CUDA and cuDNN for Tokamax.
image: 'us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-cuda13.2-cudnn9.15'
timeout-minutes: 300
steps:
- name: Checkout Tokamax
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install dependencies
run: |
python3.12 -m uv pip install --upgrade pip
python3.12 -m uv pip --version
python3.12 -m uv pip install -e .[${{ matrix.device }},test]
python3.12 -m uv pip freeze
- name: Test Tokamax ops with unittest
run: |
pytest -s -m "not long" --ignore-glob="*/test_base.py" --ignore=tokamax/_src/ops/attention/ --ignore-glob="*/splash_attention" tokamax/_src/ops
tokamax-presubmit:
strategy:
matrix:
runner: ['linux-x86-a3-8g-h100-1gpu', 'linux-x86-ct6e-44-1tpu']
include:
- runner: 'linux-x86-a3-8g-h100-1gpu'
device: 'cuda'
- runner: 'linux-x86-ct6e-44-1tpu'
device: 'tpu'
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
container:
# Docker image will include CUDA and cuDNN for Tokamax.
image: 'us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build-cuda13.2-cudnn9.15'
timeout-minutes: 300
steps:
- name: Checkout Tokamax
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install dependencies
run: |
echo "Installing dependencies on device ${{ matrix.device }}"
python3.12 -m uv pip install --upgrade pip
python3.12 -m uv pip --version
python3.12 -m uv pip install -e .[${{ matrix.device }},test]
python3.12 -m uv pip freeze
- name: Test Tokamax ops with unittest
# TODO: Disable benchmarking tests for presubmit until container is fixed
run: |
pytest -s -vv -m "not long" --ignore-glob="tokamax/_src/ops/*" --ignore-glob="tokamax/_src/benchmarking_test*" tokamax