mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
size instead of st.size (#4001)
This commit is contained in:
@@ -49,6 +49,6 @@ def run_schedule(schedule:List[ScheduleItem]):
|
||||
real_buffers = [x.buffer for x in si.outputs+si.inputs if x.size != 0]
|
||||
assert dont_allocate or all(hasattr(x, "_buf") for x in real_buffers), f"can't run, some inputs aren't realized {real_buffers}"
|
||||
if prg: prg.exec(real_buffers, si.var_vals)
|
||||
elif (out:=si.outputs[0]).size > 0: update_stats(colored(f"empty {out.st.size:10d} {out.dtype}", "yellow"), 0, 0, {}, None, 1, device=out.device)
|
||||
elif (out:=si.outputs[0]).size > 0: update_stats(colored(f"empty {out.size:10d} {out.dtype}", "yellow"), 0, 0, {}, None, 1, device=out.device)
|
||||
if GRAPH:
|
||||
for out in si.outputs: realized_lazybuffer(out, GlobalCounters.kernel_count)
|
||||
|
||||
@@ -188,8 +188,8 @@ def create_schedule(outs:List[LazyBuffer], seen:Optional[Set[LazyBuffer]]=None)
|
||||
assign_targets = {x.srcs[1]:x for x in realizes if x.op is LoadOps.ASSIGN and x not in seen and x.realized is None}
|
||||
|
||||
# breadth first ordering
|
||||
graph: DefaultDict[LazyBuffer,List[LazyBuffer]] = defaultdict(list)
|
||||
in_degree: DefaultDict[LazyBuffer,int] = defaultdict(int)
|
||||
graph: DefaultDict[LazyBuffer, List[LazyBuffer]] = defaultdict(list)
|
||||
in_degree: DefaultDict[LazyBuffer, int] = defaultdict(int)
|
||||
for out, si in prescheduled.items():
|
||||
for x in si.inputs:
|
||||
graph[x].append(out)
|
||||
|
||||
Reference in New Issue
Block a user