Skip to content

Because tinygrad got out of hand with line count

Notifications You must be signed in to change notification settings

conwayz/toonygrad

 
 

Repository files navigation

tinygrad was supposed to be 1000 lines, it's now almost 10,000!

toonygrad will fix these issues. This is a similar project to teenygrad, but the line count target is...3000?

Tensor doesn't have a LazyBuffer anymore, only an immutable UOp. Only CLANG backend. Everything in dirs.

dtypes.py and helpers.py don't import from tinygrad, they are fine. they might have issues but the issues don't spread

tensor.py, function.py, dtypes.py, helpers.py stay as is mostly.

Once HCQ is removed, it's probably fine to bring in device.py and runtime/ops_clang.py

- No more lazy.py file
- Minimum Python version is 3.10

All of nn is mostly fine, except for state using MultiLazyBuffer and strides_for_shape.

Main issues:
lazy needs to go
multi needs to be rewritten as UOps, probably EXPAND

All these in Tensor need to go:
from toonygrad.lazy import LazyBuffer
from toonygrad.multi import MultiLazyBuffer
from toonygrad.ops import MetaOps, truncate, smax, resolve, UOp, UOps, BinaryOps
from toonygrad.device import Device, Buffer, BufferOptions
from toonygrad.shape.symbolic import sint, Variable
from toonygrad.engine.realize import run_schedule, memory_planner
from toonygrad.engine.schedule import ScheduleItem, create_schedule_with_vars

toonygrad is pretty much just a replacement of engine and codegen

About

Because tinygrad got out of hand with line count

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • HTML 3.0%