MCPcopy
hub / github.com/tinygrad/tinygrad / ref

Method ref

tinygrad/device.py:125–127  ·  view source on GitHub ↗
(self, cnt)

Source from the content-addressed store, hash-verified

123 @property
124 def _buf(self) -> Any: return self._bufs[self.device]
125 def ref(self, cnt):
126 self.base._uop_refcount += cnt
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

Callers 10

refMethod · 0.45
__init__Method · 0.45
__del__Method · 0.45
_apply_uopMethod · 0.45
__call__Method · 0.45
__del__Method · 0.45
from_bufferMethod · 0.45
bufferMethod · 0.45
_wrapFunction · 0.45
nfFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected