mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-06 21:53:53 -05:00
895 B
895 B
Frontend
Everything in Tensor is syntactic sugar around function.py, where the forwards and backwards passes are implemented for the different ops. That goes on to construct a graph of
::: tinygrad.lazy.LazyBuffer options: show_source: false
Lowering
The scheduler converts the graph of LazyBuffers into a list of ScheduleItem. ast specifies what compute to run, and bufs specifies what buffers to run it on.
::: tinygrad.ops.ScheduleItem
The code in realize lowers ScheduleItem to ExecItem with
::: tinygrad.engine.realize.lower_schedule
Execution
Creating ExecItem, which has a run method
::: tinygrad.engine.realize.ExecItem options: members: true
Lists of ExecItem can be condensed into a single ExecItem with the Graph API (rename to Queue?)