mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
fix process replay
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user