fix process replay

This commit is contained in:
George Hotz
2025-12-03 14:56:28 -08:00
parent 2280dae504
commit 183b3ced03

View File

@@ -672,8 +672,12 @@ class UOp(OpMixin, metaclass=UOpMetaClass):
return ret
@property
def realized(self) -> Buffer|MultiBuffer|None:
# only these can be realized
if self.op not in (Ops.BUFFER, Ops.MSTACK): return None
# LUNIQUEs are never realized
if self.op_in_backward_slice_with_self(Ops.LUNIQUE): return None
# NOTE: this is used by the JIT to determine which inputs we capture
return self.buffer if self.op in {Ops.BUFFER, Ops.MSTACK} and self.buffer.is_allocated() else None
return self.buffer if self.buffer.is_allocated() else None
@property
def is_realized(self) -> bool:
return all(x.base.realized is not None for x in self.base.src) if self.base.op is Ops.MULTI else self.base.realized is not None