Files
StarPilot/tinygrad_repo/docs/DESIGNv2.md
T
FrogAi d7dac0e5c2 openpilot v0.9.7 release
date: 2024-06-11T01:36:39
master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
2024-07-01 12:08:10 -07:00

995 B

tinygrad is a bit bloated now, and there's several places where concerns should be seperated and they aren't.

tensor.py and mlops.py are great code. The interface going backward here is:

LazyBuffer.const (this creates a matching size buffer) LazyBuffer.contiguous (tbis is not exactly elementwise) LazyBuffer.e (elementwise) LazyBuffer.r (reduce) reshape/permute/expand/stride/shrink/pad (movement)

The lazy.py reordering engine has a lot of junk to deal with movementops that should be removed.

view.py is mostly great code, except it shouldn't have the rendering logic, and the int type should be parameterized to not import from symbolic.

LazyOp shouldn't have LazyBuffers as sources, just LazyOp LoadOps with a tuple of Views. Then the LazyOp uniquely determines the kernel and we don't have to do any replacement.

ShapeTracker probably shouldn't exist and just be a part of LazyBuffer. Most of the stuff in ShapeTracker should move to symbolic_view, which combines view and symbolic.