Merge branch 'master' into shrink_in_render

This commit is contained in:
George Hotz 2026-05-28 15:06:43 -07:00 committed by GitHub
commit 19246184d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 28 deletions

View file

@ -228,6 +228,11 @@ runs:
sudo chown -R $USER:$USER /var/cache/apt/archives/
- name: Add clang to PATH (Linux)
if: inputs.llvm == 'true' && runner.os == 'Linux'
shell: bash
run: echo "/usr/lib/llvm-20/bin" >> "$GITHUB_PATH"
# **** AMD ****
- name: Setup AMD (Linux)
if: inputs.amd == 'true' && runner.os == 'Linux'

View file

@ -17,7 +17,7 @@ on:
jobs:
llvmspeed:
name: LLVM Speed
runs-on: ubuntu-24.04
runs-on: &linux ${{ github.repository == 'tinygrad/tinygrad' && github.event_name == 'pull_request' && github.event.pull_request.author_association == 'COLLABORATOR' && 'namespace-profile-tinygrad' || 'ubuntu-24.04' }}
timeout-minutes: 20
steps:
- name: Checkout Code
@ -35,7 +35,7 @@ jobs:
docs:
name: Docs
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 10
env:
CHECK_OOB: 0
@ -89,7 +89,7 @@ jobs:
torchbackend:
name: Torch Backend Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -125,7 +125,7 @@ jobs:
torchbackendmore:
name: Torch Backend Tests More
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -147,7 +147,7 @@ jobs:
bepython:
name: Python Backend
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -215,7 +215,7 @@ jobs:
linter:
name: Linters
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 10
steps:
@ -246,7 +246,7 @@ jobs:
nulltest:
name: Null Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
@ -277,7 +277,7 @@ jobs:
unittest:
name: Unit Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
@ -320,7 +320,7 @@ jobs:
matrix:
group: [1, 2]
name: SPEC=2 (${{ matrix.group }})
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -331,12 +331,13 @@ jobs:
key: spec-unit
deps: testing_unit
python-version: '3.14'
llvm: 'true'
- name: Test SPEC=2
run: SPEC=2 pytest --maxfail=10 -n auto --durations=30 test/unit test/backend test/opt --ignore test/backend/test_custom_kernel.py --ignore test/unit/test_hashing.py --timeout 60 -k "not test_setitem_big" -k "not test_conv2d_ceildiv_edge_case" --splits 2 --group ${{ matrix.group }}
fuzzing:
name: Fuzzing
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 10
steps:
- name: Checkout Code
@ -357,7 +358,7 @@ jobs:
testopenclimage:
name: CL IMAGE Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -377,7 +378,7 @@ jobs:
testgpumisc:
name: CL Misc tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 10
steps:
- name: Checkout Code
@ -402,7 +403,7 @@ jobs:
testopenpilot:
name: openpilot Compile Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -432,7 +433,7 @@ jobs:
testonnxcpu:
name: ONNX (CPU) Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
steps:
@ -460,7 +461,7 @@ jobs:
testopencl:
name: ONNX (CL)+Optimization Tests
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
steps:
- name: Checkout Code
@ -494,7 +495,7 @@ jobs:
testllm:
name: Test LLM
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
env:
CHECK_OOB: 0
@ -519,7 +520,7 @@ jobs:
testmodels:
name: Models (llvm+cpu+gpu)
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -562,7 +563,7 @@ jobs:
testdsp:
name: Linux (DSP)
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -580,13 +581,13 @@ jobs:
- name: Run test_tiny on DSP
run: DEBUG=2 DEV=DSP python test/test_tiny.py
- name: Test transcendentals
run: CC=clang-20 DEBUG=2 DEV=DSP python test/backend/test_transcendental.py TestTranscendentalVectorized
run: DEBUG=2 DEV=DSP python test/backend/test_transcendental.py TestTranscendentalVectorized
- name: Test quantize onnx
run: DEBUG=2 DEV=DSP python3 test/backend/test_quantize_onnx.py
testwebgpu:
name: Linux (WebGPU)
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
steps:
- name: Checkout Code
@ -610,7 +611,7 @@ jobs:
testamdasm:
name: AMD ASM IDE
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
env:
DEV: MOCKKFD+AMD
@ -657,7 +658,7 @@ jobs:
testmockam:
name: Linux (am)
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
env:
DEV: MOCKPCI+AMD
@ -693,7 +694,7 @@ jobs:
arch: [gfx1100, gfx1201, gfx950]
name: Linux (${{ matrix.backend }} ${{ matrix.arch }})
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
env:
DEV: MOCKKFD+AMD:${{ matrix.backend == 'amdllvm' && 'LLVM' || '' }}:${{ matrix.arch }}
@ -728,7 +729,7 @@ jobs:
backend: [ptx, nv]
name: Linux (${{ matrix.backend }})
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
env:
FORWARD_ONLY: 1
@ -763,7 +764,7 @@ jobs:
backend: [llvm, cpu, opencl, lvp, x86]
name: Linux (${{ matrix.backend }})
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 20
steps:
- name: Checkout Code
@ -777,7 +778,7 @@ jobs:
llvm: ${{ matrix.backend == 'llvm' || matrix.backend == 'cpu' || matrix.backend == 'lvp' }}
mesa: ${{ matrix.backend == 'lvp' && 'cpu' }}
- name: Set env
run: printf "${{ matrix.backend == 'llvm' && 'DEV=CPU:LLVM' || matrix.backend == 'cpu' && 'CC=clang-20\nDEV=CPU\nCPU_COUNT=2' || matrix.backend == 'opencl' && 'DEV=CL' || matrix.backend == 'lvp' && 'DEV=CPU:LVP' || matrix.backend == 'x86' && 'DEV=CPU:X86' }}" >> $GITHUB_ENV
run: printf "${{ matrix.backend == 'llvm' && 'DEV=CPU:LLVM' || matrix.backend == 'cpu' && 'DEV=CPU\nCPU_COUNT=2' || matrix.backend == 'opencl' && 'DEV=CL' || matrix.backend == 'lvp' && 'DEV=CPU:LVP' || matrix.backend == 'x86' && 'DEV=CPU:X86' }}" >> $GITHUB_ENV
- name: Check Device.DEFAULT and print some source
run: |
python3 -c "from tinygrad import Device; assert Device.DEFAULT in ['CPU','CL'], Device.DEFAULT"
@ -962,7 +963,7 @@ jobs:
matrix:
backend: [ir3, nak]
name: Compile-only (${{ matrix.backend }})
runs-on: ubuntu-24.04
runs-on: *linux
timeout-minutes: 15
steps:
- name: Checkout Code
@ -994,7 +995,7 @@ jobs:
python -m pytest -n=auto test/backend/test_ops.py --durations=20
qcomclcompiletests:
name: Compile-only (QCOM CL)
runs-on: ubuntu-24.04-arm
runs-on: ${{ github.repository == 'tinygrad/tinygrad' && github.event_name == 'pull_request' && github.event.pull_request.author_association == 'MEMBER' && 'namespace-profile-tinygrad-arm64' || 'ubuntu-24.04-arm' }}
timeout-minutes: 15
steps:
- name: Checkout Code