diff --git a/.github/actions/setup-tinygrad/action.yml b/.github/actions/setup-tinygrad/action.yml index 6c1ca1c5f9..ebf53c6bf4 100644 --- a/.github/actions/setup-tinygrad/action.yml +++ b/.github/actions/setup-tinygrad/action.yml @@ -295,7 +295,10 @@ runs: run: brew install llvm@20 # **** mesa **** - - name: Install mesa - if: inputs.mesa == 'true' + - name: Install mesa (linux) + if: inputs.mesa == 'true' && runner.os == 'Linux' shell: bash run: sudo curl -L https://github.com/sirhcm/tinymesa/releases/download/tinymesa-32dc66c/libtinymesa_cpu-mesa-25.2.4-linux-amd64.so -o /usr/lib/libtinymesa_cpu.so + - name: Install mesa (macOS) + if: inputs.mesa == 'true' && runner.os == 'macOS' + run: brew install sirhcm/tinymesa/tinymesa diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03c1fd49e7..5ce85ea1b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -896,7 +896,7 @@ jobs: strategy: fail-fast: false matrix: - backend: [metal, llvm, cpu] + backend: [metal, llvm, cpu, lvp] name: MacOS (${{ matrix.backend }}) runs-on: macos-15 timeout-minutes: 20 @@ -909,12 +909,13 @@ jobs: key: macos-${{ matrix.backend }}-minimal deps: testing_minimal pydeps: "capstone" - llvm: ${{ matrix.backend == 'llvm' && 'true' }} + llvm: ${{ matrix.backend == 'llvm' || matrix.backend == 'lvp' }} + mesa: ${{ matrix.backend == 'lvp' && 'true' }} - name: Set env - run: printf "${{ matrix.backend == 'llvm' && 'CPU=1\nCPU_LLVM=1' || matrix.backend == 'cpu' && 'CPU=1\nCPU_LLVM=0\nCPU_COUNT=2' || matrix.backend == 'metal' && 'METAL=1'}}" >> $GITHUB_ENV + run: printf "${{ matrix.backend == 'llvm' && 'CPU=1\nCPU_LLVM=1' || matrix.backend == 'cpu' && 'CPU=1\nCPU_LLVM=0\nCPU_COUNT=2' || matrix.backend == 'metal' && 'METAL=1' || matrix.backend == 'lvp' && 'CPU=1\nCPU_LVP=1' }}" >> $GITHUB_ENV - name: Check Device.DEFAULT and print some source run: | - python -c "from tinygrad import Device; assert Device.DEFAULT == {'LLVM':'CPU'}.get(x:='${{ matrix.backend }}'.upper(), x), Device.DEFAULT" + python -c "from tinygrad import Device; assert Device.DEFAULT == {'LLVM':'CPU','LVP':'CPU'}.get(x:='${{ matrix.backend }}'.upper(), x), Device.DEFAULT" DEBUG=4 python3 test/test_tiny.py TestTiny.test_plus - name: Run pytest (${{ matrix.backend }}) run: python3 -m pytest -n=auto test/ --ignore=test/models --ignore=test/unit --durations=20