mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-23 18:33:51 +08:00
e20fa4e313
version: sunnypilot v2026.003.000 (feature-branch)
date: 2026-11-21T03:18:39
master commit: 0e583a9c1b
47 lines
1.0 KiB
Markdown
47 lines
1.0 KiB
Markdown
# Runtime Overview
|
|
|
|
## Overview
|
|
|
|
A typical runtime consists of the following parts:
|
|
|
|
- [Compiled](#compiled)
|
|
- [Allocator](#allocator)
|
|
- [Program](#program)
|
|
- [Compiler](#compiler)
|
|
|
|
### Compiled
|
|
|
|
The `Compiled` class is responsible for initializing and managing a device.
|
|
|
|
::: tinygrad.device.Compiled
|
|
options:
|
|
members: [
|
|
"synchronize"
|
|
]
|
|
show_source: false
|
|
|
|
### Allocator
|
|
|
|
The `Allocator` class manages memory on the device and caches allocated buffers for reuse.
|
|
|
|
::: tinygrad.device.Allocator
|
|
options:
|
|
members: true
|
|
show_source: false
|
|
|
|
### Program
|
|
|
|
The `Program` class is created for each loaded program. It is responsible for executing the program on the device. As an example, here is a `CPUProgram` implementation which loads program and runs it.
|
|
|
|
::: tinygrad.runtime.ops_cpu.CPUProgram
|
|
options:
|
|
members: true
|
|
|
|
### Compiler
|
|
|
|
The `Compiler` class compiles the output from the `Renderer` and produces it in a device-specific format.
|
|
|
|
::: tinygrad.device.Compiler
|
|
options:
|
|
members: true
|