Running the unmodified Linux amdgpu driver on an iPad
LemonSeed Studio: Bringing Linux AMD GPU Drivers to iPad
LemonSeed Studio is an innovative project developed by Geramy that transforms the iPad into a powerful development environment. By leveraging a Thunderbolt connection to an external AMD GPU, it enables local LLM (Large Language Model) inference directly on iPadOS.
The core achievement of this project is the integration of the standard cloud-reliant unmodified upstream Linux amdgpu driver, functioning within the Apple ecosystem via DriverKit.
🛠️ Technical Architecture
The system is composed of three primary pillars that allow the iPad to communicate with high-performance hardware.
| Component | Technical Role | Implementation Detail |
|---|---|---|
mac_linuxgpu | GPU Driver | Unmodified Linux amdgpu + amdkfd embedded as a PCIDriverKit extension. |
LemonSeed Engine | Inference Engine | Executes LLMs using the HSA runtime and HRX/Loom. |
amdgpu_mtopg | Telemetry | Provides real-time monitoring of GPU performance. |
System Data Flow
💻 Development & Setup
The project is structured into several key directories: Engine, Studio, Toolchain, docs, and third_party. To get the environment running, follow these steps:
- Clone the repository (including all submodules).
- Initialize dependencies for existing clones.
- Build the project (Note:
mac_linuxgpuwill sparsely fetch pinned Linux sources during the first build).
Command Line Instructions:
# Clone the full project with submodules
git clone --recurse-submodules https://github.com/Geramy/LemonSeed-Studio
# If already cloned, update the submodules
git submodule update --init
Note: Because
mac_linuxgpuhandles its own nested kernel submodules via sparse fetching during the build process, you do not need to clone those specific nested components recursively.
📊 Performance Logic
The ability to run local inference can be conceptualized as a function of hardware throughput and driver efficiency. If we represent the total compute capacity as , the relationship is roughly:
By using the amdgpu driver, the project maximizes on non-native hardware.
📜 Licensing and Legal
The primary codebase is dual-licensed, allowing users to choose between:
- MIT License
- GPL-2.0-only
Important: The various bundled components and submodules maintain their own independent licenses. For a comprehensive list, please refer to the THIRD_PARTY.md file.
Project Tags: amdgpu code-editor driverkit egpu ide ipad ipados llm local-llm swiftui