mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-07 03:00:26 -04:00
remove iter from uopgraph (#6110)
* remove iter from uopgraph * linearize returns uops * fix tests * linearize in linearize * tests fix * touchup * test failures
This commit is contained in:
7
test/external/external_benchmark_schedule.py
vendored
7
test/external/external_benchmark_schedule.py
vendored
@@ -21,18 +21,17 @@ if __name__ == "__main__":
|
||||
sched = out.schedule()
|
||||
|
||||
asts = {x.ast.key:x.ast for x in sched if x.ast.op is UOps.SINK}.values()
|
||||
uops = []
|
||||
kernels = []
|
||||
with Profiling(PROFILE):
|
||||
with Timing("***** model uops in "):
|
||||
for ast in asts:
|
||||
k = Kernel(ast)
|
||||
k.hand_coded_optimizations()
|
||||
k.linearize()
|
||||
uops.append((k.name, k.uops))
|
||||
kernels.append(k)
|
||||
|
||||
with Profiling(PROFILE, fn="/tmp/schedule.prof"):
|
||||
with Timing("***** model linearize in "):
|
||||
for _,u in uops: u.linearize()
|
||||
for k in kernels: k.linearize()
|
||||
|
||||
#renderer = Device[Device.DEFAULT].renderer
|
||||
#with Profiling(PROFILE, fn="/tmp/schedule.prof"):
|
||||
|
||||
2
test/external/fuzz_linearizer.py
vendored
2
test/external/fuzz_linearizer.py
vendored
@@ -155,7 +155,7 @@ def fuzz_linearizer(lin: Kernel, rtol=1e-2, atol=1e-2):
|
||||
if not FUZZ_ALL_ACTIONS and test_lin.applied_opts: print(f"applied opts: {test_lin.applied_opts}")
|
||||
|
||||
# stop if kernel uops repeat
|
||||
try: tuops = tuplize_uops(test_lin.linearize().uops.uops)
|
||||
try: tuops = tuplize_uops(test_lin.linearize().uops)
|
||||
except BaseException as e:
|
||||
print(test_lin.ast)
|
||||
print(test_lin.applied_opts)
|
||||
|
||||
Reference in New Issue
Block a user