opt transforms the ast into an optimized ast (#10900)

* 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?
This commit is contained in:
George Hotz
2025-06-22 09:41:26 -07:00
committed by GitHub
parent ffddf165f8
commit b09c47366f
8 changed files with 96 additions and 24 deletions

View File

@@ -1,6 +1,8 @@
# tinygrad directory layout
Listed in order of how they are processed
This explains the flow of a big graph down to programs.
Directories are listed in order of how they are processed.
---
@@ -20,7 +22,11 @@ Group UOps into kernels.
Transforms the ast into an optimized ast. This is where BEAM search and heuristics live.
When finished, this will just have a function that takes in the ast and returns the optimized ast.
::: tinygrad.opt.get_optimized_ast
options:
members: false
show_labels: false
show_source: false
---
@@ -38,10 +44,23 @@ Transform the optimized ast into a linearized list of UOps.
## tinygrad/renderer
Transform the linearized list of UOps into a program.
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