From 091fbfd3515bc443ea31f33c62e3469dcbaebbbc Mon Sep 17 00:00:00 2001 From: 1okko <15377594951@189.cn> Date: Wed, 7 Oct 2026 11:50:13 +0800 Subject: [PATCH] tinygrad: tolerate empty rewrite timings --- tinygrad_repo/tinygrad/engine/realize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinygrad_repo/tinygrad/engine/realize.py b/tinygrad_repo/tinygrad/engine/realize.py index 062ad32fc..aef2e4f64 100644 --- a/tinygrad_repo/tinygrad/engine/realize.py +++ b/tinygrad_repo/tinygrad/engine/realize.py @@ -58,7 +58,8 @@ def estimate_uop(call:UOp) -> Estimates: return Estimates() first_run_cache:set[bytes] = set() -def track_stats(ctx:ExecContext, call:UOp, st:decimal.Decimal, ets:list[float|None]): +def track_stats(ctx:ExecContext, call:UOp, st:decimal.Decimal, ets:list[float|None]|None): + ets = ets or [] if ctx.update_stats: is_hcq = (ast:=call.src[0]).op is Ops.CUSTOM_FUNCTION and ast.arg == "hcq" estimates, n = estimate_uop(call), 1 if is_hcq else len(get_call_kernels(call))