lowerer is kernel [run_process_replay] (#5437)

This commit is contained in:
George Hotz
2024-07-12 18:50:55 -07:00
committed by GitHub
parent b8342fb085
commit 03c2dc8bd7
33 changed files with 215 additions and 213 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# compare kernels created by HEAD against master
import difflib, pickle
from tinygrad.codegen.lowerer import Lowerer
from tinygrad.codegen.kernel import Kernel
from tinygrad.helpers import Context, ContextVar, colored, db_connection, VERSION, getenv, tqdm
page_size = 100
@@ -17,7 +17,7 @@ for offset in tqdm(range(0, row_count, page_size)):
with Context(**{k:v for k,v in ctx.items() if k in ContextVar._cache}):
# try linearize
try:
k = Lowerer(ast, opts=opts)
k = Kernel(ast, opts=opts)
for opt in applied_opts: k.apply_opt(opt)
good_src = k.opts.render(name, k.linearize().uops)
except Exception as e: