MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / nbytes

Method nbytes

tinygrad/dtype.py:83–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 return PtrDType(self.priority, self.bitsize, self.name, self.fmt, self.count, None, self, addrspace, 1, size)
82 def scalar(self) -> DType: return self._scalar if self._scalar is not None else self
83 def nbytes(self) -> int: raise RuntimeError("only ptr types have nbytes")
84 @functools.cached_property
85 def min(self):
86 if dtypes.is_int(self): return 0 if dtypes.is_unsigned(self) else -2**(self.scalar().bitsize-1)

Callers 8

valid_dimsMethod · 0.45
upload_fileFunction · 0.45
eval_harnessFunction · 0.45
llama3.pyFile · 0.45
llama.pyFile · 0.45
qwq.pyFile · 0.45
train_gpt2.pyFile · 0.45
flat_llama.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected