mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-24 06:18:01 -05:00
* opt transforms the ast into an optimized ast * fix get_kernel order and to_function_name * function_name property * update docs * copy from kernel.py * improve docs * ci didn't trigger?
67 lines
1.2 KiB
Markdown
67 lines
1.2 KiB
Markdown
# tinygrad directory layout
|
|
|
|
This explains the flow of a big graph down to programs.
|
|
|
|
Directories are listed in order of how they are processed.
|
|
|
|
---
|
|
|
|
## tinygrad/kernelize
|
|
|
|
Group UOps into kernels.
|
|
|
|
::: tinygrad.kernelize.kernelize.get_kernelize_map
|
|
options:
|
|
members: false
|
|
show_labels: false
|
|
show_source: false
|
|
|
|
---
|
|
|
|
## tinygrad/opt
|
|
|
|
Transforms the ast into an optimized ast. This is where BEAM search and heuristics live.
|
|
|
|
::: tinygrad.opt.get_optimized_ast
|
|
options:
|
|
members: false
|
|
show_labels: false
|
|
show_source: false
|
|
|
|
---
|
|
|
|
## tinygrad/codegen
|
|
|
|
Transform the optimized ast into a linearized list of UOps.
|
|
|
|
::: tinygrad.codegen.full_rewrite
|
|
options:
|
|
members: false
|
|
show_labels: false
|
|
show_source: false
|
|
|
|
---
|
|
|
|
## tinygrad/renderer
|
|
|
|
Transform the linearized list of UOps into a program, represented as a string.
|
|
|
|
::: tinygrad.renderer.Renderer
|
|
options:
|
|
members:
|
|
- render
|
|
show_labels: false
|
|
show_source: false
|
|
|
|
---
|
|
|
|
## tinygrad/engine
|
|
|
|
Abstracted high level interface to the runtimes.
|
|
|
|
::: tinygrad.engine.realize.get_program
|
|
options:
|
|
members: false
|
|
show_labels: false
|
|
show_source: false
|