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:
George Hotz
2025-09-10 11:18:18 +08:00
committed by GitHub
parent 499f50483b
commit ef53a6fc19
+1 -2
View File
@@ -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([