MCPcopy
hub / github.com/tinygrad/tinygrad / is_initialized

Method is_initialized

tinygrad/device.py:129–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 return self
128 # check if the underlying buffer is allocated and the current buffer/view is initialized
129 def is_initialized(self) -> bool: return self.is_allocated() and self.device in self._bufs
130 # check if the underlying buffer is allocated, possibly from the base object
131 def is_allocated(self) -> bool: return self.base.is_allocated() if self._base is not None else self.device in self._bufs
132 def get_buf(self, device: str) -> Any:

Callers 6

ensure_allocatedMethod · 0.95
allocateMethod · 0.95
copyinMethod · 0.95
copyoutMethod · 0.95
free_intermediatesMethod · 0.45

Calls 1

is_allocatedMethod · 0.95

Tested by 1