cache_key = (device, st, dtype, op, arg, tuple(ref(x) for x in srcs)) if base is None else (st, ref(base))The line count probably does still act as a limit on complexity overall but perhaps less than hoped for.
PyTorch does more than tinygrad, but does it really do 343x more things?
The Python source distribution has long maintained the philosophy of “batteries included” – having a rich and versatile standard library which is immediately available, without making the user download separate packages.
https://peps.python.org/pep-0206/
OTOH:
Simple is better than complex.
Complex is better than complicated.
https://peps.python.org/pep-0020/The README no longer mentions the limit and it looks like they just raise it whenever needed. Three months ago it was bumped to 6500 LOC. One month ago it was bumped to 8000 lines.
LOC limits have to be one of the worst incentives you can give programmers.
However, that doesn't solve everything. Many things it does not accurately measure, e.g. complexity, number of stuff in one line, program speed, memory usage, etc. Those are other things to measure, and it can be helpful to reduce memory usage etc, but that is not the number of lines of codes.