Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Last active April 7, 2026 05:55
Show Gist options
  • Select an option

  • Save pythoninthegrass/b533a8433fe944b3ab1a93fb61c8b1d3 to your computer and use it in GitHub Desktop.

Select an option

Save pythoninthegrass/b533a8433fe944b3ab1a93fb61c8b1d3 to your computer and use it in GitHub Desktop.
TinyGPU Setup on macOS for eGPU

TinyGPU Setup on macOS

Prerequisites

  • Python >= 3.11 (tinygrad 0.12.0 requires it)
  • uv (or pip)
  • numpy

1. Clone tinygrad and install it

git clone https://github.com/tinygrad/tinygrad.git
cd tinygrad
uv pip install --system -e .

2. Run the setup script

Override DEBUG if it is set to a non-integer in your env.

Run from outside the tinygrad repo directory to avoid circular import errors (tinygrad/ in CWD shadows the installed package).

export DEBUG=0
cd /tmp
curl -fsSL https://raw.githubusercontent.com/tinygrad/tinygrad/master/extra/setup_tinygpu_osx.sh | sh

The script installs the TinyGPU driver extension (org.tinygrad.tinygpu.driver2).

On first AMD device use, tinygrad downloads kernel headers and firmware blobs from linux-kernel, linux-firmware, and ROCm repos automatically.

3. Approve the driver extension

  • System Settings > General > Login Items & Extensions > Driver Extensions > toggle TinyGPU ON
  • Or: System Settings > Privacy & Security — allow the TinyGPU extension

4. Connect the GPU and verify

cd /tmp
python3 -c 'from tinygrad import Tensor; print(Tensor([1,2,3]).to("AMD").numpy())'
# Expected: [1 2 3]

Run tinygrad scripts from outside the tinygrad repo directory to avoid circular imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment