pretty print lazy op per default (#5505)

* pretty lop

* min diff

* walrus

* fix

* min diff

* simplify

* pretty helper function

* ws

* pretty uop upat

* tests

* stricter tests

* test passes

* ws

* stronger upat test

* delete print_tree

* min diff

* stricter exp test

* fix merge

* stronger uops eval test

* +readable and deep upat test

* +readable and deep upat test

* sort inv fix

* fix

* revert allowed_len
This commit is contained in:
kormann
2024-07-18 18:34:08 +02:00
committed by GitHub
parent c30092e56d
commit 2c4add6844
21 changed files with 80 additions and 126 deletions

View File

@@ -4,7 +4,6 @@ from examples.mlperf.helpers import get_mlperf_bert_model
from tinygrad import Tensor, Device, dtypes, nn
from tinygrad.codegen.kernel import Kernel
from tinygrad.device import Compiled
from tinygrad.engine.graph import print_tree
from tinygrad.engine.schedule import create_schedule
from tinygrad.engine.search import time_linearizer, beam_search, bufs_from_lin
from tinygrad.helpers import DEBUG, ansilen, getenv
@@ -81,8 +80,7 @@ if __name__ == "__main__":
for i,si in enumerate(sched):
ops = get_lazyop_info(si.ast.src[0]).flops
if DEBUG >= 2:
print_tree(si.ast)
if DEBUG >= 2: print(si.ast)
rawbufs = bufs_from_lin(Kernel(si.ast))