Compare commits

...
Author SHA1 Message Date
George HotzandGitHub 8006595cde Clean up postrange.py by removing comments 2025-09-10 09:40:20 +08:00
geohot 18da4cdcbd does that pass? 2025-09-08 11:12:46 -07:00
geohot 8b944a32eb one call to hc opt 2025-09-08 10:30:04 -07:00
+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([