Files
tinygrad/.github/workflows/platform.yml
T
geohot ded058424d
Unit Tests / Linters (pull_request) Successful in 2m43s
Unit Tests / Docs (pull_request) Successful in 3m39s
Unit Tests / Unit Tests (pull_request) Successful in 3m45s
Unit Tests / Python Backend (pull_request) Successful in 3m52s
Unit Tests / SPEC=2 (2) (pull_request) Successful in 4m8s
Unit Tests / SPEC=2 (1) (pull_request) Successful in 4m14s
Unit Tests / Null Tests (pull_request) Successful in 4m22s
Unit Tests / Torch Backend Tests (pull_request) Successful in 4m33s
Unit Tests / Fuzzing (pull_request) Successful in 3m23s
Unit Tests / Linux (DSP) (pull_request) Successful in 1m59s
Unit Tests / Test LLM (pull_request) Successful in 2m27s
Unit Tests / CL IMAGE Tests (pull_request) Successful in 3m14s
Unit Tests / Models (pull_request) Successful in 4m11s
Unit Tests / openpilot Compile Tests (pull_request) Successful in 5m2s
Unit Tests / ONNX (CPU) Tests (pull_request) Successful in 5m33s
Unit Tests / Linux (DEV=CPU:LLVM) (pull_request) Successful in 3m24s
Unit Tests / Linux (DEV=CPU:LVP) (pull_request) Successful in 3m18s
Unit Tests / Optimization Tests (pull_request) Successful in 6m24s
Unit Tests / Linux (DEV=CL) (pull_request) Successful in 4m30s
Unit Tests / Linux (DEV=CPU:CLANG) (pull_request) Successful in 4m33s
Unit Tests / Linux (DEV=CPU:X86) (pull_request) Successful in 3m23s
Unit Tests / AMD ASM IDE (pull_request) Successful in 2m37s
Unit Tests / hcq2 (pull_request) Successful in 2m12s
Unit Tests / Linux (DEV=WEBGPU) (pull_request) Successful in 4m14s
Unit Tests / Linux (amdllvm gfx1100) (pull_request) Successful in 4m9s
Unit Tests / Linux (am) (pull_request) Successful in 4m52s
Unit Tests / Linux (amd gfx1100) (pull_request) Successful in 4m39s
Unit Tests / Linux (amd gfx1201) (pull_request) Successful in 4m39s
Check Line Counts / Check PR Branch status (pull_request_target) Successful in 11s
Unit Tests / Linux (amdllvm gfx1201) (pull_request) Successful in 4m2s
Check Line Counts / Core Library Line Difference (pull_request_target) Skipped
Unit Tests / Linux (amdllvm gfx950) (pull_request) Successful in 4m20s
Unit Tests / Compile-only (nak) (pull_request) Successful in 1m40s
Unit Tests / Linux (amd gfx950) (pull_request) Successful in 6m10s
Unit Tests / Linux (nv) (pull_request) Successful in 5m12s
Unit Tests / Compile-only (ir3) (pull_request) Successful in 3m30s
Unit Tests / Linux (ptx) (pull_request) Successful in 3m53s
Platform Tests / MacOS (unit) (pull_request) Canceled after 0s
Platform Tests / MacOS (unit, mock) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=METAL) (1) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=METAL) (2) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=CPU:CLANG) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=CPU:LLVM) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=CPU:LVP) (pull_request) Canceled after 0s
Platform Tests / MacOS (DEV=WEBGPU) (pull_request) Canceled after 0s
Platform Tests / Windows (DEV=CPU:CLANG) (pull_request) Canceled after 0s
Platform Tests / Windows (DEV=CPU:LLVM) (pull_request) Canceled after 0s
Platform Tests / Windows (DEV=CPU:X86) (pull_request) Canceled after 0s
Platform Tests / Windows (DEV=WEBGPU) (pull_request) Canceled after 0s
Platform Tests / Compile-only (QCOM CL) (pull_request) Canceled after 0s
ci: split mac/windows/qcom-cl tests into platform.yml
Move the 6 jobs that don't run on Linux (4 macos, 1 windows, 1 QCOM CL
compile test on arm) out of test.yml into a separate Platform Tests
workflow so they run (and can be gated/runners-matched) independently.
2026-08-09 21:48:06 -07:00

213 lines
7.0 KiB
YAML

name: Platform Tests
env:
# increment this when downloads substantially change to avoid the internet
CACHE_VERSION: '19'
CAPTURE_PROCESS_REPLAY: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[pr]') && '1' || '0' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHONPATH: ${{ github.workspace }}
CHECK_OOB: 1
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
concurrency:
group: platform-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# ****** OSX Tests ******
unittestmacos:
name: MacOS (unit)
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: unittest-macos
deps: testing_unit
- name: Run unit tests
run: DEV=METAL python -m pytest -n=auto test/unit/ --durations=20
- name: Test tensor core ops (fake)
run: DEV=METAL DEBUG=3 TC=2 python test/backend/test_ops.py TestOps.test_gemm
- name: Test tensor core ops (real)
run: DEV=METAL DEBUG=3 python test/backend/test_ops.py TestOps.test_big_gemm
- name: Test Beam Search
run: DEV=METAL IGNORE_BEAM_CACHE=1 python3 -m pytest extra/optimization/test_beam_search.py
- name: Test Device Specific
run: DEV=METAL python3 -m pytest test/device/test_metal.py
#- name: Fuzz Test linearizer
# run: DEV=METAL DEPTH=4 FUZZ_N=50 FUZZ_MAX_SIZE=1000000 python test/external/fuzz_linearizer.py
- name: Run process replay tests
uses: ./.github/actions/process-replay
unittestmacosmock:
name: MacOS (unit, mock)
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: unittest-macos-mock
deps: testing_unit
amd: 'true'
ocelot: 'true'
- name: Run NULL backend tests
run: SPEC=2 DEV=NULL python -m pytest -n=auto test/null/ --durations=20
- name: Run pytest (amd)
env:
DEV: MOCKKFD+AMD
FORWARD_ONLY: 1
run: |
python3 -m pytest -n=auto test/device/test_hcq.py test/test_tiny.py --durations=20
- name: Run pytest (ptx)
env:
DEV: "MOCK+NV:PTX"
FORWARD_ONLY: 1
# TODO: failing due to library loading error
CAPTURE_PROCESS_REPLAY: 0
run: |
python3 -m pytest -n=auto test/device/test_hcq.py test/test_tiny.py --durations=20
- name: Run process replay tests
uses: ./.github/actions/process-replay
testmetal:
strategy:
fail-fast: false
matrix:
group: [1, 2]
name: MacOS (DEV=METAL) (${{ matrix.group }})
runs-on: macos-26
timeout-minutes: 20
env:
DEV: METAL
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: macos-metal
deps: testing_unit
- name: Check Device.DEFAULT and print some source
run: |
python -c "from tinygrad import Device; assert Device.DEFAULT == 'METAL'"
DEBUG=4 python test/test_tiny.py TestTiny.test_plus
- name: Run backend tests
run: python -m pytest -n=auto test/backend --durations=20 --splits 2 --group ${{ matrix.group }}
- name: Run process replay tests
uses: ./.github/actions/process-replay
testmacos:
strategy:
fail-fast: false
matrix:
dev:
- 'CPU:CLANG'
- 'CPU:LLVM'
- 'CPU:LVP'
- 'WEBGPU'
name: MacOS (DEV=${{ matrix.dev }})
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: macos-${{ matrix.dev }}
deps: "testing_unit${{ contains(matrix.dev, 'LVP') && ' mesa' || '' }}"
llvm: ${{ contains(matrix.dev, 'LLVM') || contains(matrix.dev, 'LVP') }}
webgpu: ${{ matrix.dev == 'WEBGPU' }}
- name: Set env
run: printf "DEV=${{ matrix.dev }}${{ matrix.dev == 'CPU:CLANG' && '\nCPU_COUNT=2' || '' }}" >> $GITHUB_ENV
- name: Check Device.DEFAULT and print some source
run: |
python -c "from tinygrad import Device; from tinygrad.helpers import Target; assert Device.DEFAULT == Target.parse('${{ matrix.dev }}').device"
DEBUG=4 python test/test_tiny.py TestTiny.test_plus
- name: Run test_tiny
run: python -m pytest -n=auto test/test_tiny.py --durations=20
- name: Run process replay tests
uses: ./.github/actions/process-replay
# ****** Windows Tests ******
testwindows:
strategy:
fail-fast: false
matrix:
dev:
- 'CPU:CLANG'
- 'CPU:LLVM'
- 'CPU:X86'
- 'WEBGPU'
name: Windows (DEV=${{ matrix.dev }})
runs-on: windows-2025
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: windows-${{ matrix.dev }}-minimal
deps: testing_unit
pydeps: ${{ matrix.dev == 'WEBGPU' && 'dawn-python' || '' }}
- name: Set env
shell: bash
run: printf "DEV=${{ matrix.dev }}${{ matrix.dev == 'CPU:CLANG' && '\nCPU_COUNT=2' || '' }}" >> $GITHUB_ENV
- name: Check Device.DEFAULT and print some source
shell: bash
run: |
python -c "from tinygrad import Device; from tinygrad.helpers import Target; assert Device.DEFAULT == Target.parse('${{ matrix.dev }}').device"
DEBUG=4 python test/test_tiny.py TestTiny.test_plus
- name: Run test_tiny
shell: bash
run: python -m pytest -n=auto test/test_tiny.py --durations=20
qcomclcompiletests:
name: Compile-only (QCOM CL)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Setup Environment
uses: ./.github/actions/setup-tinygrad
with:
key: compile-qcomcl
deps: testing_unit
tinydreno: 'true'
- name: Set env
shell: bash
run: printf "DEV=NULL:QCOMCL:a630\nNULL_ALLOW_COPYOUT=1" >> $GITHUB_ENV
- name: Run test_ops
shell: bash
run: |
python -c "from tinygrad import Device; assert Device.DEFAULT == 'NULL'"
DEBUG=4 python3 test/backend/test_ops.py TestOps.test_add
python -m pytest -n=auto test/backend/test_ops.py --durations=20
- name: Run test_ops (IMAGE)
shell: bash
env:
IMAGE: 1
DEV: "NULL:QCOMCL:a630,IMAGE_PITCH_ALIGNMENT=64"
run: |
DEBUG=4 python test/backend/test_ops.py TestOps.test_gemm | grep read_imagef
python -m pytest -n=auto test/backend/test_ops.py --durations=20