forked from tinygrad/tinygrad
one call to hc opt (#12074)
* one call to hc opt * does that pass? * Clean up postrange.py by removing comments
This commit is contained in:
@@ -325,8 +325,7 @@ def apply_opts(ctx:Renderer, ast:UOp):
|
||||
from tinygrad.codegen.opt.heuristic import hand_coded_optimizations
|
||||
# NOTE: hand_coded_optimizations doesn't support multiblock opts yet
|
||||
if all(len(u.src) == 1 for u in ast.parents if u.op is Ops.LOAD):
|
||||
# TODO: why is the returned k from hand_coded_optimizations different than this?
|
||||
for opt in hand_coded_optimizations(k).applied_opts: k.apply_opt(opt)
|
||||
k = hand_coded_optimizations(k)
|
||||
return k.get_optimized_ast(name_override=ast.arg.name if ast.arg is not None and ast.arg.name != "test" else None)
|
||||
|
||||
pm_postrange_opt = PatternMatcher([
|
||||
|
||||
Reference in New Issue
Block a user